Transfer group fails to remove permissions from previous owner on 6.0.0 and 6.1.0.pre
Created by: gdahlm
owner_id
and they have a group_access value of of 50
From the UI, as a user who is the "OWNER" of a group, they see themself listed as owner and the relevent database entries show their user_id 22 as the mysql> select * from users_groups where id = 5;
+----+--------------+----------+---------+---------------------+---------------------+--------------------+
| id | group_access | group_id | user_id | created_at | updated_at | notification_level |
+----+--------------+----------+---------+---------------------+---------------------+--------------------+
| 5 | 50 | 57 | 22 | 2013-08-23 22:31:01 | 2013-08-23 22:31:01 | 3 |
+----+--------------+----------+---------+---------------------+---------------------+--------------------+
1 row in set (0.00 sec)
mysql> select * from namespaces where id = 57;
+----+-----------------+-----------------+----------+---------------------+---------------------+-------+-------------+
| id | name | path | owner_id | created_at | updated_at | type | description |
+----+-----------------+-----------------+----------+---------------------+---------------------+-------+-------------+
| 57 | Hypervisors_old | hypervisors_old | 22 | 2013-04-19 03:39:59 | 2013-08-24 02:45:36 | Group | |
+----+-----------------+-----------------+----------+---------------------+---------------------+-------+-------------+
1 row in set (0.00 sec)
After going to settings->transfer->Group Transfer, selecting another user (id 1 in this case) and submiting
- the original users.id 22 still has a group_access level of
50
- namespaces.owner_id is changed as expected
- the oringial user account can still add/remove members (except themself) and create projects as only the "owner" level
group_access = 50
permission would allow.
mysql> select * from users_groups where id = 5;
+----+--------------+----------+---------+---------------------+---------------------+--------------------+
| id | group_access | group_id | user_id | created_at | updated_at | notification_level |
+----+--------------+----------+---------+---------------------+---------------------+--------------------+
| 5 | 50 | 57 | 22 | 2013-08-23 22:31:01 | 2013-08-23 22:31:01 | 3 |
+----+--------------+----------+---------+---------------------+---------------------+--------------------+
1 row in set (0.00 sec)
mysql> select * from namespaces where id = 57;
+----+-----------------+-----------------+----------+---------------------+---------------------+-------+-------------+
| id | name | path | owner_id | created_at | updated_at | type | description |
+----+-----------------+-----------------+----------+---------------------+---------------------+-------+-------------+
| 57 | Hypervisors_old | hypervisors_old | 1 | 2013-04-19 03:39:59 | 2013-08-24 02:48:28 | Group | |
+----+-----------------+-----------------+----------+---------------------+---------------------+-------+-------------+
1 row in set (0.00 sec)
Output of rake gitlab:check with all but a few repo names cut for brevity
[root@gdahlmangitlab gitlab]# sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
Checking Environment ...
Git configured for git user? ... yes
Has python2? ... yes
python2 is supported version? ... yes
Checking Environment ... Finished
Checking GitLab Shell ...
GitLab Shell version >= 1.7.0 ? ... OK (1.7.0)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
post-receive hook up-to-date? ... yes
post-receive hooks in repos are links: ...
Zabbix / zabbix ... ok
Torque / Torque ... ok
Hypervisors_old / test_junk ... ok
Hypervisors_old / BlaBla ... repository is empty
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Checking Sidekiq ... Finished
Checking GitLab ...
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
Projects have satellites? ...
Zabbix / zabbix ... yes
Torque / Torque ... yes
Hypervisors_old / test_junk ... yes
Hypervisors_old / BlaBla ... yes
Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/local/bin/git"
Git version >= 1.7.10 ? ... yes (1.8.3)
Checking GitLab ... Finished
[root@gdahlmangitlab gitlab]#