You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* By default {@link Jenkins#ADMINISTER}, but {@link Jenkins#SYSTEM_READ} or {@link Jenkins#MANAGE} are also supported.
307
+
* By default {@link Jenkins#ADMINISTER}, but {@link Jenkins#SYSTEM_READ} or
308
+
* {@link Jenkins#MANAGE} are also supported.
279
309
* <p>
280
-
* Changing this permission check to return {@link Jenkins#SYSTEM_READ} will make the active
281
-
* administrative monitor appear on {@link ManageJenkinsAction} to users without Administer permission.
282
-
* {@link #doDisable(StaplerRequest2, StaplerResponse2)} will still always require Administer permission.
310
+
* Changing this permission check to return {@link Jenkins#SYSTEM_READ} will
311
+
* make the active
312
+
* administrative monitor appear on {@link ManageJenkinsAction} to users without
313
+
* Administer permission.
314
+
* {@link #doDisable(StaplerRequest2, StaplerResponse2)} will still always
315
+
* require Administer permission.
283
316
* </p>
284
317
* <p>
285
-
* This method only allows for a single permission to be returned. If more complex permission checks are required,
286
-
* override {@link #checkRequiredPermission()} and {@link #hasRequiredPermission()} instead.
318
+
* This method only allows for a single permission to be returned. If more
319
+
* complex permission checks are required,
320
+
* override {@link #checkRequiredPermission()} and
321
+
* {@link #hasRequiredPermission()} instead.
287
322
* </p>
288
323
* <p>
289
-
* Implementers need to ensure that {@code doAct} and other web methods perform necessary permission checks:
290
-
* Users with System Read permissions are expected to be limited to read-only access.
291
-
* Form UI elements that change system state, e.g. toggling a feature on or off, need to be hidden from users
292
-
* lacking Administer permission.
324
+
* Implementers need to ensure that {@code doAct} and other web methods perform
325
+
* necessary permission checks:
326
+
* Users with System Read permissions are expected to be limited to read-only
327
+
* access.
328
+
* Form UI elements that change system state, e.g. toggling a feature on or off,
329
+
* need to be hidden from users
330
+
* lacking Administer permission.
293
331
* </p>
332
+
*
294
333
* @since 2.233
295
-
* @deprecated Callers should use {@link #checkRequiredPermission()} or {@link #hasRequiredPermission()}.
334
+
* @deprecated Callers should use {@link #checkRequiredPermission()} or
335
+
* {@link #hasRequiredPermission()}.
296
336
*/
297
337
@Deprecated
298
338
publicPermissiongetRequiredPermission() {
299
339
returnJenkins.ADMINISTER;
300
340
}
301
341
302
342
/**
303
-
* Checks if the current user has the minimum required permission to view this administrative monitor.
343
+
* Checks if the current user has the minimum required permission to view this
344
+
* administrative monitor.
304
345
* <p>
305
-
* Subclasses may override this method and {@link #hasRequiredPermission()} instead of {@link #getRequiredPermission()} to perform more complex permission checks,
306
-
* for example, checking either {@link Jenkins#MANAGE} or {@link Jenkins#SYSTEM_READ}.
346
+
* Subclasses may override this method and {@link #hasRequiredPermission()}
347
+
* instead of {@link #getRequiredPermission()} to perform more complex
348
+
* permission checks,
349
+
* for example, checking either {@link Jenkins#MANAGE} or
350
+
* {@link Jenkins#SYSTEM_READ}.
307
351
* </p>
352
+
*
308
353
* @see #getRequiredPermission()
309
354
* @see #hasRequiredPermission()
310
355
* @since 2.468
@@ -314,11 +359,16 @@ public void checkRequiredPermission() {
314
359
}
315
360
316
361
/**
317
-
* Checks if the current user has the minimum required permission to view this administrative monitor.
362
+
* Checks if the current user has the minimum required permission to view this
363
+
* administrative monitor.
318
364
* <p>
319
-
* Subclasses may override this method and {@link #checkRequiredPermission} instead of {@link #getRequiredPermission()} to perform more complex permission checks,
320
-
* for example, checking either {@link Jenkins#MANAGE} or {@link Jenkins#SYSTEM_READ}.
365
+
* Subclasses may override this method and {@link #checkRequiredPermission}
366
+
* instead of {@link #getRequiredPermission()} to perform more complex
367
+
* permission checks,
368
+
* for example, checking either {@link Jenkins#MANAGE} or
369
+
* {@link Jenkins#SYSTEM_READ}.
321
370
* </p>
371
+
*
322
372
* @see #getRequiredPermission()
323
373
* @see #checkRequiredPermission()
324
374
* @since 2.468
@@ -328,9 +378,11 @@ public boolean hasRequiredPermission() {
328
378
}
329
379
330
380
/**
331
-
* Checks if the current user has the minimum required permission to view any administrative monitor.
381
+
* Checks if the current user has the minimum required permission to view any
382
+
* administrative monitor.
332
383
*
333
-
* @return true if the current user has the minimum required permission to view any administrative monitor.
384
+
* @return true if the current user has the minimum required permission to view
385
+
* any administrative monitor.
334
386
*
335
387
* @since 2.468
336
388
*/
@@ -339,7 +391,8 @@ public static boolean hasPermissionToDisplay() {
339
391
}
340
392
341
393
/**
342
-
* Ensure that URLs in this administrative monitor are only accessible to users with {@link #getRequiredPermission()}.
394
+
* Ensure that URLs in this administrative monitor are only accessible to users
0 commit comments