1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 06:33:48 +00:00

Merge pull request #2662 from haiwen/org-public-repo

fix bug when org user create public repo
This commit is contained in:
Daniel Pan
2018-12-18 14:29:51 +08:00
committed by GitHub

View File

@@ -156,7 +156,10 @@ class UserPermissions(object):
"""
if CLOUD_MODE:
return False
if MULTI_TENANCY:
return True
else:
return False
elif self.user.is_staff:
return True
elif get_enabled_role_permissions_by_role(self.user.role)['can_add_public_repo']: