##// END OF EJS Templates
users: personal repo-group shouldn't be available for default user.
marcink -
r1690:5e538546 default
parent child Browse files
Show More
@@ -2208,6 +2208,9 b' class RepoGroup(Base, BaseModel):'
2208 @classmethod
2208 @classmethod
2209 def get_user_personal_repo_group(cls, user_id):
2209 def get_user_personal_repo_group(cls, user_id):
2210 user = User.get(user_id)
2210 user = User.get(user_id)
2211 if user.username == User.DEFAULT_USER:
2212 return None
2213
2211 return cls.query()\
2214 return cls.query()\
2212 .filter(cls.personal == true())\
2215 .filter(cls.personal == true()) \
2213 .filter(cls.user == user).scalar()
2216 .filter(cls.user == user).scalar()
@@ -669,7 +669,8 b' class UserModel(BaseModel):'
669 user_id, api_key, username)
669 user_id, api_key, username)
670 return False
670 return False
671 if not dbuser.active:
671 if not dbuser.active:
672 log.debug('User `%s` is inactive, skipping fill data', username)
672 log.debug('User `%s:%s` is inactive, skipping fill data',
673 username, user_id)
673 return False
674 return False
674
675
675 log.debug('filling user:%s data', dbuser)
676 log.debug('filling user:%s data', dbuser)
General Comments 0
You need to be logged in to leave comments. Login now