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