diff options
Diffstat (limited to 'app/models/group.rb')
| -rw-r--r-- | app/models/group.rb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index cfb8faa1491..4ff610f8e9d 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -76,8 +76,24 @@ class Group < Namespace add_users([user], access_level, current_user) end + def add_guest(user, current_user = nil) + add_user(user, Gitlab::Access::GUEST, current_user) + end + + def add_reporter(user, current_user = nil) + add_user(user, Gitlab::Access::REPORTER, current_user) + end + + def add_developer(user, current_user = nil) + add_user(user, Gitlab::Access::DEVELOPER, current_user) + end + + def add_master(user, current_user = nil) + add_user(user, Gitlab::Access::MASTER, current_user) + end + def add_owner(user, current_user = nil) - self.add_user(user, Gitlab::Access::OWNER, current_user) + add_user(user, Gitlab::Access::OWNER, current_user) end def has_owner?(user) |
