Merge ~adam-collard/maas:no-double-permission-checking into maas:master

Proposed by Adam Collard
Status: Merged
Approved by: Christian Grabowski
Approved revision: 2d5b6049c940bb86dd74726d6a3ae6e810da972f
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~adam-collard/maas:no-double-permission-checking
Merge into: maas:master
Diff against target: 13 lines (+1/-3)
1 file modified
src/maasserver/node_action.py (+1/-3)
Reviewer Review Type Date Requested Status
MAAS Lander Approve
Christian Grabowski Approve
Review via email: mp+431750@code.launchpad.net

Commit message

fix: don't double check permissions in compile_node_actions

is_actionable() already checks is_permitted(); no need to double check it.

To post a comment you must log in.
Revision history for this message
Christian Grabowski (cgrabowski) wrote :

+1

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b no-double-permission-checking lp:~adam-collard/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 2d5b6049c940bb86dd74726d6a3ae6e810da972f

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/maasserver/node_action.py b/src/maasserver/node_action.py
2index 0049c1b..fd989e7 100644
3--- a/src/maasserver/node_action.py
4+++ b/src/maasserver/node_action.py
5@@ -1117,7 +1117,5 @@ def compile_node_actions(node, user, request=None, classes=ACTION_CLASSES):
6 """
7 actions = (action_class(node, user, request) for action_class in classes)
8 return OrderedDict(
9- (action.name, action)
10- for action in actions
11- if action.is_actionable() and action.is_permitted()
12+ (action.name, action) for action in actions if action.is_actionable()
13 )

Subscribers

People subscribed via source and target branches