File tree 1 file changed +7
-1
lines changed
src/main/java/hudson/plugins/perforce
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 8
8
import hudson .model .Action ;
9
9
import hudson .model .Hudson ;
10
10
import hudson .scm .AbstractScmTagAction ;
11
+ import hudson .security .Permission ;
11
12
import hudson .util .FormValidation ;
12
13
import org .kohsuke .stapler .StaplerRequest ;
13
14
import org .kohsuke .stapler .StaplerResponse ;
@@ -154,7 +155,7 @@ public synchronized FormValidation doCheckTag(@QueryParameter String value) {
154
155
* Invoked to actually tag the workspace.
155
156
*/
156
157
public synchronized void doSubmit (StaplerRequest req , StaplerResponse rsp ) throws IOException , ServletException {
157
- Hudson . getInstance ().checkPermission (Hudson . ADMINISTER );
158
+ getACL ().checkPermission (getPermission () );
158
159
159
160
String tag = req .getParameter ("name" );
160
161
String desc = req .getParameter ("desc" );
@@ -233,5 +234,10 @@ public void setName(String name) {
233
234
}
234
235
235
236
}
237
+
238
+ @ Override
239
+ protected Permission getPermission () {
240
+ return PerforceSCM .TAG ;
241
+ }
236
242
237
243
}
You can’t perform that action at this time.
0 commit comments