diff --git a/pagure/default_config.py b/pagure/default_config.py index 218639d..530644c 100644 --- a/pagure/default_config.py +++ b/pagure/default_config.py @@ -193,11 +193,12 @@ BLACKLISTED_GROUPS = ['forks'] ACLS = { 'create_project': 'Create a new project', + 'issue_assign': 'Assign issue to someone', 'issue_create': 'Create a new ticket against this project', 'issue_change_status': 'Change the status of a ticket of this project', 'issue_comment': 'Comment on a ticket of this project', - 'pull_request_merge': 'Merge a pull-request of this project', 'pull_request_close': 'Close a pull-request of this project', 'pull_request_comment': 'Comment on a pull-request of this project', 'pull_request_flag': 'Flag a pull-request of this project', + 'pull_request_merge': 'Merge a pull-request of this project', } diff --git a/tests/__init__.py b/tests/__init__.py index 0746c1a..13e8132 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -263,7 +263,7 @@ def create_tokens(session, user_id=1): def create_tokens_acl(session, token_id='aaabbbcccddd'): """ Create some acls for the tokens. """ - for aclid in range(8): + for aclid in range(len(pagure.APP.config['ACLS'])): item = pagure.lib.model.TokenAcl( token_id=token_id, acl_id=aclid + 1, diff --git a/tests/test_pagure_flask_api_fork.py b/tests/test_pagure_flask_api_fork.py index 9c689ea..a8e69c6 100644 --- a/tests/test_pagure_flask_api_fork.py +++ b/tests/test_pagure_flask_api_fork.py @@ -366,9 +366,11 @@ class PagureFlaskApiForktests(tests.Modeltests): ) self.session.add(item) self.session.commit() + + # Allow the token to close PR item = pagure.lib.model.TokenAcl( token_id='foobar_token', - acl_id=5, + acl_id=6, ) self.session.add(item) self.session.commit() @@ -478,9 +480,11 @@ class PagureFlaskApiForktests(tests.Modeltests): ) self.session.add(item) self.session.commit() + + # Allow the token to merge PR item = pagure.lib.model.TokenAcl( token_id='foobar_token', - acl_id=8, + acl_id=9, ) self.session.add(item) self.session.commit()