Skip to content

Commit

Permalink
[FIXED JENKINS-13736] tagging now only requires the TAG permission
Browse files Browse the repository at this point in the history
  • Loading branch information
rpetti committed May 10, 2012
1 parent d5ba5f9 commit 2205924
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/hudson/plugins/perforce/PerforceTagAction.java
Expand Up @@ -8,6 +8,7 @@
import hudson.model.Action;
import hudson.model.Hudson;
import hudson.scm.AbstractScmTagAction;
import hudson.security.Permission;
import hudson.util.FormValidation;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
Expand Down Expand Up @@ -154,7 +155,7 @@ public synchronized FormValidation doCheckTag(@QueryParameter String value) {
* Invoked to actually tag the workspace.
*/
public synchronized void doSubmit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
Hudson.getInstance().checkPermission(Hudson.ADMINISTER);
getACL().checkPermission(getPermission());

String tag = req.getParameter("name");
String desc = req.getParameter("desc");
Expand Down Expand Up @@ -233,5 +234,10 @@ public void setName(String name) {
}

}

@Override
protected Permission getPermission() {
return PerforceSCM.TAG;
}

}

0 comments on commit 2205924

Please sign in to comment.