Colin Watson has proposed merging ~cjwatson/launchpad:tidy-manage-access-tokens 
into launchpad:master.

Commit message:
Rename "Edit access tokens" to "Manage access tokens"

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/414618

This is consistent with other "Manage ..." links on `GitRepository` used for 
things like permissions.

I think it also makes a little more sense for the "Manage access tokens" link 
to be next to "Manage permissions" and "View activity", which deal with other 
kinds of access control, and in any event "Delete repository" should stay in 
the last position, so I've reordered the links a bit.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~cjwatson/launchpad:tidy-manage-access-tokens into launchpad:master.
diff --git a/lib/lp/code/browser/gitrepository.py b/lib/lp/code/browser/gitrepository.py
index d47e0f5..202df02 100644
--- a/lib/lp/code/browser/gitrepository.py
+++ b/lib/lp/code/browser/gitrepository.py
@@ -266,9 +266,9 @@ class GitRepositoryEditMenu(NavigationMenu):
         "reviewer",
         "permissions",
         "activity",
+        "access_tokens",
         "webhooks",
         "delete",
-        "access_tokens",
         ]
 
     @enabled_with_permission("launchpad.Edit")
@@ -287,6 +287,16 @@ class GitRepositoryEditMenu(NavigationMenu):
         return Link("+permissions", text, icon="edit")
 
     @enabled_with_permission("launchpad.Edit")
+    def activity(self):
+        text = "View activity"
+        return Link("+activity", text, icon="info")
+
+    @enabled_with_permission("launchpad.Edit")
+    def access_tokens(self):
+        text = "Manage access tokens"
+        return Link("+access-tokens", text, icon="edit")
+
+    @enabled_with_permission("launchpad.Edit")
     def webhooks(self):
         text = "Manage webhooks"
         return Link(
@@ -294,20 +304,10 @@ class GitRepositoryEditMenu(NavigationMenu):
             enabled=bool(getFeatureFlag('webhooks.new.enabled')))
 
     @enabled_with_permission("launchpad.Edit")
-    def activity(self):
-        text = "View activity"
-        return Link("+activity", text, icon="info")
-
-    @enabled_with_permission("launchpad.Edit")
     def delete(self):
         text = "Delete repository"
         return Link("+delete", text, icon="trash-icon")
 
-    @enabled_with_permission("launchpad.Edit")
-    def access_tokens(self):
-        text = "Edit access tokens"
-        return Link("+access-tokens", text, icon="edit")
-
 
 class GitRepositoryContextMenu(ContextMenu, HasRecipesMenuMixin):
     """Context menu for `IGitRepository`."""
diff --git a/lib/lp/services/auth/tests/test_browser.py b/lib/lp/services/auth/tests/test_browser.py
index 70e3234..c98de78 100644
--- a/lib/lp/services/auth/tests/test_browser.py
+++ b/lib/lp/services/auth/tests/test_browser.py
@@ -73,7 +73,7 @@ class TestAccessTokenViewBase:
         expected_tokens_url = canonical_url(
             self.target, view_name="+access-tokens", rootsite="code")
         browser = self.getUserBrowser(target_url, user=self.owner)
-        tokens_link = browser.getLink("Edit access tokens")
+        tokens_link = browser.getLink("Manage access tokens")
         self.assertEqual(expected_tokens_url, tokens_link.url)
 
     def makeTokensAndMatchers(self, count):
_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to