public interface AccessHelperI extends org.bedework.access.PrivilegeDefs, Serializable
It assumes that it has access to the parent object when needed, continuing on up to the root. For systems which do not allow for a retrieval of the parent on calls to the getCalendar method, the getParent method for this class will need to be overridden. This would presumably take place within the core implementation.
| Modifier and Type | Interface and Description |
|---|---|
static class |
AccessHelperI.CallBack
Methods called to obtain system information.
|
allowed, allowedInherited, denied, deniedInherited, inheritedFlag, oldAllowed, oldDenied, privAll, privAny, privBind, privEncoding, privMaxType, privNone, privRead, privReadAcl, privReadCurrentUserPrivilegeSet, privReadFreeBusy, privSchedule, privScheduleDeliver, privScheduleDeliverInvite, privScheduleDeliverReply, privScheduleFreeBusy, privScheduleQueryFreebusy, privScheduleReply, privScheduleRequest, privScheduleSend, privScheduleSendFreebusy, privScheduleSendInvite, privScheduleSendReply, privUnbind, privUnlock, privWrite, privWriteAcl, privWriteContent, privWriteProperties, unspecified| Modifier and Type | Method and Description |
|---|---|
void |
changeAccess(SharedEntity ent,
Collection<org.bedework.access.Ace> aces,
boolean replaceAll)
Change the access to the given calendar entity using the supplied aces.
|
Collection<? extends SharedEntity> |
checkAccess(Collection<? extends SharedEntity> ents,
int desiredAccess,
boolean alwaysReturn)
Return a Collection of the objects after checking access
|
org.bedework.access.CurrentAccess |
checkAccess(SharedEntity ent,
int desiredAccess,
boolean alwaysReturnResult)
Check access for the given entity.
|
void |
close()
Called at request end
|
void |
defaultAccess(SharedEntity ent,
org.bedework.access.AceWho who)
Remove any explicit access for the given who to the given calendar entity.
|
String |
getDefaultPersonalAccess() |
String |
getDefaultPublicAccess()
Get the default public access
|
SharedEntity |
getParent(SharedEntity val)
Called to get the parent object for a shared entity.
|
boolean |
getSuperUser() |
void |
init(AccessHelperI.CallBack cb) |
void |
open()
Called at request start
|
void |
setAuthPrincipal(org.bedework.access.AccessPrincipal val)
Set the current authenticated user.
|
void |
setSuperUser(boolean val)
Indicate if we are in superuser mode.
|
void init(AccessHelperI.CallBack cb) throws WebdavException
cb - callbackWebdavException - on errorvoid setSuperUser(boolean val)
val - true for superuserboolean getSuperUser()
void setAuthPrincipal(org.bedework.access.AccessPrincipal val)
val - principalvoid open()
void close()
SharedEntity getParent(SharedEntity val) throws WebdavException
val - entityWebdavException - on errorString getDefaultPublicAccess()
String getDefaultPersonalAccess()
void changeAccess(SharedEntity ent, Collection<org.bedework.access.Ace> aces, boolean replaceAll) throws WebdavException
ent - DbEntityaces - Collection of ace objectsreplaceAll - true to replace the entire access list.WebdavException - on errorvoid defaultAccess(SharedEntity ent, org.bedework.access.AceWho who) throws WebdavException
ent - DbEntitywho - AceWhoWebdavException - on errorCollection<? extends SharedEntity> checkAccess(Collection<? extends SharedEntity> ents, int desiredAccess, boolean alwaysReturn) throws WebdavException
ents - Collection of DbEntitydesiredAccess - access we wantalwaysReturn - boolean flag behaviour on no accessWebdavException - for no access or other failureorg.bedework.access.CurrentAccess checkAccess(SharedEntity ent, int desiredAccess, boolean alwaysReturnResult) throws WebdavException
We special case the access to the user root e.g /user and the home directory, e.g. /user/douglm We deny access to /user to anybody without superuser access. This prevents user browsing. This could be made a system property if the organization wants user browsing. Default access to the home directory is read, write-content to the owner only and unlimited to superuser. Specific access should be no more than read, write-content to the home directory.
ent - shred entitydesiredAccess - accessalwaysReturnResult - true to return alwaysWebdavException - on errorCopyright © 2018 Bedework. All rights reserved.