#5436 Enable pull_request_update acl for user tokens
Merged 2 years ago by ngompa. Opened 2 years ago by mmassari.

@@ -393,6 +393,7 @@ 

      "group_modify",

      "update_watch_status",

      "pull_request_create",

+     "pull_request_update",

      "commit",

  ]

  

file modified
+21
@@ -30,6 +30,8 @@ 

  import pagure.lib.model

  import tests

  

+ from pagure.config import config as pagure_config

+ 

  

  class PagureLibtests_search_user(tests.Modeltests):

      """
@@ -5710,6 +5712,25 @@ 

              [a.name for a in acls], ["create_project", "issue_create"]

          )

  

+     def test_get_acls_restrict_CROSS_PROJECT_ACLS(self):

+         """Test CROSS_PROJECT_ACLS is well formed and working with get_acls."""

+         acls = pagure.lib.query.get_acls(

+             self.session, restrict=pagure_config.get("CROSS_PROJECT_ACLS")

+         )

+         self.assertEqual(

+             sorted([a.name for a in acls]),

+             [

+                 "commit",

+                 "create_project",

+                 "fork_project",

+                 "group_modify",

+                 "modify_project",

+                 "pull_request_create",

+                 "pull_request_update",

+                 "update_watch_status",

+             ],

+         )

+ 

      def test_filter_img_src(self):

          """Test the filter_img_src function of pagure.lib.query."""

          for name in ("alt", "height", "width", "class"):

Packit needs this acl to be able to update PRs it has already created.
We are implementing this feature:
https://github.com/packit/packit/issues/2182

rebased onto 3a660455a94d56b69e6126e708e74e9a0e1ef4bc

2 years ago

rebased onto 133da07

2 years ago

This is great, thanks for the patch!

Pull-Request has been merged by ngompa

2 years ago