Show More
@@ -379,6 +379,10 b' class UserGroupsController(BaseControlle' | |||
|
379 | 379 | (x.group for x in c.user_group.users_group_repo_group_to_perm), |
|
380 | 380 | key=lambda u: u.group_name.lower()) |
|
381 | 381 | |
|
382 | c.group_to_review_rules = sorted( | |
|
383 | (x.users_group for x in c.user_group.user_group_review_rules), | |
|
384 | key=lambda u: u.users_group_name.lower()) | |
|
385 | ||
|
382 | 386 | return render('admin/user_groups/user_group_edit.mako') |
|
383 | 387 | |
|
384 | 388 | @HasUserGroupPermissionAnyDecorator('usergroup.admin') |
@@ -385,6 +385,11 b' class UsersController(BaseController):' | |||
|
385 | 385 | c.personal_repo_group = RepoGroup.get_user_personal_repo_group(user_id) |
|
386 | 386 | c.personal_repo_group_name = RepoGroupModel()\ |
|
387 | 387 | .get_personal_group_name(user) |
|
388 | ||
|
389 | c.user_to_review_rules = sorted( | |
|
390 | (x.user for x in c.user.user_review_rules), | |
|
391 | key=lambda u: u.username.lower()) | |
|
392 | ||
|
388 | 393 | c.first_admin = User.get_first_super_admin() |
|
389 | 394 | defaults = user.get_dict() |
|
390 | 395 |
@@ -575,6 +575,8 b' class User(Base, BaseModel):' | |||
|
575 | 575 | 'ExternalIdentity', |
|
576 | 576 | primaryjoin="User.user_id==ExternalIdentity.local_user_id", |
|
577 | 577 | cascade='all') |
|
578 | # review rules | |
|
579 | user_review_rules = relationship('RepoReviewRuleUser', cascade='all') | |
|
578 | 580 | |
|
579 | 581 | def __unicode__(self): |
|
580 | 582 | return u"<%s('id:%s:%s')>" % (self.__class__.__name__, |
@@ -1269,6 +1271,7 b' class UserGroup(Base, BaseModel):' | |||
|
1269 | 1271 | user_user_group_to_perm = relationship('UserUserGroupToPerm', cascade='all') |
|
1270 | 1272 | user_group_user_group_to_perm = relationship('UserGroupUserGroupToPerm ', primaryjoin="UserGroupUserGroupToPerm.target_user_group_id==UserGroup.users_group_id", cascade='all') |
|
1271 | 1273 | |
|
1274 | user_group_review_rules = relationship('RepoReviewRuleUserGroup', cascade='all') | |
|
1272 | 1275 | user = relationship('User', primaryjoin="User.user_id==UserGroup.user_id") |
|
1273 | 1276 | |
|
1274 | 1277 | @classmethod |
@@ -11,6 +11,7 b'' | |||
|
11 | 11 | (_('Assigned to repositories'), len(c.group_to_repos),'', [x for x in c.group_to_repos]), |
|
12 | 12 | (_('Assigned to repo groups'), len(c.group_to_repo_groups), '', [x for x in c.group_to_repo_groups]), |
|
13 | 13 | |
|
14 | (_('Assigned to review rules'), len(c.group_to_review_rules), '', [x for x in c.group_to_review_rules]), | |
|
14 | 15 | ] |
|
15 | 16 | %> |
|
16 | 17 |
@@ -13,6 +13,8 b'' | |||
|
13 | 13 | (_('User groups'), len(c.user.user_groups), '', [x.users_group_name for x in c.user.user_groups]), |
|
14 | 14 | |
|
15 | 15 | (_('Reviewer of pull requests'), len(c.user.reviewer_pull_requests), '', ['Pull Request #{}'.format(x.pull_request.pull_request_id) for x in c.user.reviewer_pull_requests]), |
|
16 | (_('Assigned to review rules'), len(c.user_to_review_rules), '', [x for x in c.user_to_review_rules]), | |
|
17 | ||
|
16 | 18 | (_('Member of User groups'), len(c.user.group_member), '', [x.users_group.users_group_name for x in c.user.group_member]), |
|
17 | 19 | (_('Force password change'), c.user.user_data.get('force_password_change', 'False'), '', ''), |
|
18 | 20 | ] |
General Comments 0
You need to be logged in to leave comments.
Login now