Skip to content

Commit

Permalink
Javadoc notes warning that the action should be hidden if impermissible.
Browse files Browse the repository at this point in the history
[JENKINS-25691] Might have prevented the need for: jenkinsci/maven-plugin#33
  • Loading branch information
jglick committed Nov 21, 2014
1 parent d237acc commit 08542ca
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions core/src/main/java/hudson/model/TaskAction.java
Expand Up @@ -60,15 +60,22 @@ public abstract class TaskAction extends AbstractModelObject implements Action {
protected transient WeakReference<AnnotatedLargeText> log;

/**
* Gets the permission object that represents the permission to perform this task.
* Gets the permission object that represents the permission (against {@link #getACL}) to perform this task.
* Generally your implementation of {@link #getIconFileName} should return null if {@code !getACL().hasPermission(getPermission())}.
*/
protected abstract Permission getPermission();

/**
* Gets the {@link ACL} against which the permissions are checked.
* Gets the {@link ACL} against which {@link #getPermission} is checked.
*/
protected abstract ACL getACL();

/**
* @inheritDoc
* @see #getPermission
*/
@Override public abstract String getIconFileName();

/**
* @deprecated as of 1.350
* Use {@link #obtainLog()}, which returns the same object in a more type-safe signature.
Expand Down

0 comments on commit 08542ca

Please sign in to comment.