Class CoolerThreadAccessControl
java.lang.Object
org.deltava.security.command.AccessControl
org.deltava.security.command.CoolerThreadAccessControl
- All Implemented Interfaces:
Serializable
An Access Controller for Water Cooler Threads.
- Since:
- 1.0
- Version:
- 11.1
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class org.deltava.security.command.AccessControl
_ctx -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns if a user can add a Linked Image to the thread.booleanReturns if the thread can be deleted.booleanReturns if the last post can be edited.booleanReturns if the thread title can be edited.booleanReturns if the thread can be locked.booleanReturns if the thread can be read.booleanReturns if a user can restore disable Linked Images in this thread.booleanReturns if the thread can be replied to, or a new post can be made in the Channel.booleanReturns whether the thread can be reported for content.booleanReturns if a user can remove a Linked Image from the thread.booleanReturns if the thread can be unlocked.booleanReturns if the thread can be unstuck.booleanReturns if the user can cast a vote in the poll.voidUpdate the MessageThread to verify access to.voidUpdates the Security Context verify access with.voidvalidate()Calculates access control rightsMethods inherited from class org.deltava.security.command.AccessControl
validateContext
-
Constructor Details
-
CoolerThreadAccessControl
Initializes the controller.- Parameters:
ctx- the Command context
-
-
Method Details
-
updateContext
Update the MessageThread to verify access to. Since this Access controller may be called many times in succession, it is more efficient to update the thread and channel rather than constantly creating a new CoolerThreadAccessControl object.- Parameters:
t- the Water Cooler message threadc- the Water Cooler Channel- See Also:
-
updateContext
Updates the Security Context verify access with. Since this Access controller may be called many times in succession, it is more efficient to update the security context rather than constantly creating a new CoolerThreadAccessControl object.- Parameters:
ctx- the Command context- See Also:
-
validate
public void validate()Description copied from class:AccessControlCalculates access control rights- Specified by:
validatein classAccessControl
-
getCanRead
public boolean getCanRead()Returns if the thread can be read.- Returns:
- TRUE if it can be read, otherwise FALSE
-
getCanReply
public boolean getCanReply()Returns if the thread can be replied to, or a new post can be made in the Channel.- Returns:
- TRUE if it can be replied to, otherwise FALSE
-
getCanReport
public boolean getCanReport()Returns whether the thread can be reported for content.- Returns:
- TRUE if it can be reported, otherwise FALSE
-
getCanEdit
public boolean getCanEdit()Returns if the last post can be edited.- Returns:
- TRUE if the post can be edited, otherwise FALSE
-
getCanEditTitle
public boolean getCanEditTitle()Returns if the thread title can be edited.- Returns:
- TRUE if the title can be edited, otherwise FALSE
-
getCanAddImage
public boolean getCanAddImage()Returns if a user can add a Linked Image to the thread.- Returns:
- TRUE if an Image can be added, otherwise FALSE
-
getCanUnlinkImage
public boolean getCanUnlinkImage()Returns if a user can remove a Linked Image from the thread.- Returns:
- TRUE if an Image can be unlinked, otherwise FALSE
-
getCanRelinkImages
public boolean getCanRelinkImages()Returns if a user can restore disable Linked Images in this thread.- Returns:
- TRUE if disabled linked images exists and can be enabled, otherwise FALSE
-
getCanVote
public boolean getCanVote()Returns if the user can cast a vote in the poll.- Returns:
- TRUE if a vote can be cast, otherwise FALSE
-
getCanLock
public boolean getCanLock()Returns if the thread can be locked.- Returns:
- TRUE if it can be locked, otherwise FALSE
-
getCanUnlock
public boolean getCanUnlock()Returns if the thread can be unlocked.- Returns:
- TRUE if it can be unlocked, otherwise FALSE
-
getCanUnstick
public boolean getCanUnstick()Returns if the thread can be unstuck.- Returns:
- TRUE if the thread can be unstuck, otherwise FALSE
-
getCanDelete
public boolean getCanDelete()Returns if the thread can be deleted.- Returns:
- TRUE if the thread can be deleted, otherwise FALSE
-