Skip to content

Commit 2205924

Browse files
committedMay 10, 2012
[FIXED JENKINS-13736] tagging now only requires the TAG permission
1 parent d5ba5f9 commit 2205924

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎src/main/java/hudson/plugins/perforce/PerforceTagAction.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import hudson.model.Action;
99
import hudson.model.Hudson;
1010
import hudson.scm.AbstractScmTagAction;
11+
import hudson.security.Permission;
1112
import hudson.util.FormValidation;
1213
import org.kohsuke.stapler.StaplerRequest;
1314
import org.kohsuke.stapler.StaplerResponse;
@@ -154,7 +155,7 @@ public synchronized FormValidation doCheckTag(@QueryParameter String value) {
154155
* Invoked to actually tag the workspace.
155156
*/
156157
public synchronized void doSubmit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
157-
Hudson.getInstance().checkPermission(Hudson.ADMINISTER);
158+
getACL().checkPermission(getPermission());
158159

159160
String tag = req.getParameter("name");
160161
String desc = req.getParameter("desc");
@@ -233,5 +234,10 @@ public void setName(String name) {
233234
}
234235

235236
}
237+
238+
@Override
239+
protected Permission getPermission() {
240+
return PerforceSCM.TAG;
241+
}
236242

237243
}

0 commit comments

Comments
 (0)