lucee.Componentcontentbox.models.BaseEntityMethods
contentbox.models.BaseEntity
contentbox.models.security.Author
ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- I am a ContentBox User/Author entity
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
APIToken
|
true
|
false
|
|
any
|
authorID
|
true
|
false
|
|
any
|
authorService
|
true
|
false
|
|
any
|
biography
|
true
|
false
|
|
date
|
createdDate
|
true
|
false
|
|
any
|
email
|
true
|
false
|
|
array
|
entries
|
true
|
false
|
|
any
|
firstName
|
true
|
false
|
|
any
|
is2FactorAuth
|
false
|
true
|
false
|
any
|
isActive
|
false
|
true
|
false
|
any
|
isDeleted
|
false
|
true
|
false
|
any
|
isPasswordReset
|
false
|
true
|
false
|
any
|
lastLogin
|
true
|
false
|
|
any
|
lastName
|
true
|
false
|
|
boolean
|
loggedIn
|
false
|
true
|
false
|
date
|
modifiedDate
|
true
|
false
|
|
any
|
numberOfContentStore
|
true
|
false
|
|
any
|
numberOfEntries
|
true
|
false
|
|
any
|
numberOfPages
|
true
|
false
|
|
array
|
pages
|
true
|
false
|
|
any
|
password
|
true
|
false
|
|
array
|
permissionGroups
|
true
|
false
|
|
any
|
permissionList
|
true
|
false
|
|
array
|
permissions
|
true
|
false
|
|
any
|
preferences
|
true
|
false
|
|
any
|
role
|
true
|
false
|
|
any
|
username
|
true
|
false
|
Constructor Summary | |
---|---|
init()
Constructor. |
Method Summary | |
---|---|
any
|
addEntry(any entry)
|
any
|
addPage(any page)
|
any
|
addPermission(any permission)
|
any
|
addPermissionGroup(any permissionGroup)
|
boolean
|
checkGroupPermissions(any slug)
This utility function checks if a slug is in any permission group this user belongs to. |
boolean
|
checkPermission(any slug)
Check for permission. |
Author
|
clearPermissions()
Clear all permissions. |
Author
|
generateAPIToken()
Generate new API Token, stores it locally but does not persist it. |
struct
|
getAllPreferences()
Get all user preferences in inflated format. |
string
|
getAPIToken()
|
string
|
getAuthorID()
|
string
|
getAuthorService()
|
string
|
getBiography()
|
string
|
getDisplayLastLogin()
Get formatted lastLogin. |
string
|
getEmail()
|
string
|
getEntries()
|
string
|
getFirstName()
|
string
|
getIs2FactorAuth()
|
string
|
getIsActive()
|
string
|
getIsPasswordReset()
|
string
|
getLastLogin()
|
string
|
getLastName()
|
string
|
getLoggedIn()
|
any
|
getMemento([any excludes='pages,entries'], [boolean showRole='true'], [boolean showPermissions='true'], [boolean showPermissionGroups='true'])
Get a flat representation of this entry. |
string
|
getName()
Retrieve full name. |
string
|
getNumberOfContentStore()
|
string
|
getNumberOfEntries()
|
string
|
getNumberOfPages()
|
string
|
getPages()
|
string
|
getPassword()
|
string
|
getPermissionGroups()
|
string
|
getPermissionGroupsList([any delimiter=','])
Shortcut Utlity function to get a list of all the permission groups this user belongs to. |
string
|
getPermissionList()
|
string
|
getPermissions()
|
any
|
getPreference(any name, [any defaultValue])
Get a preference, you can pass a default value if preference does not exist. |
string
|
getPreferences()
|
string
|
getRole()
|
string
|
getUsername()
|
boolean
|
hasEntry([any entry])
|
boolean
|
hasPage([any page])
|
boolean
|
hasPermission([any permission])
|
boolean
|
hasPermissionGroup([any permissionGroup])
|
boolean
|
hasRole([any role])
|
any
|
inPermissionList(any list)
Verify that a passed in list of perms the user can use. |
any
|
isLoggedIn()
Utility method to verify if an author has been logged in to the system or not. |
any
|
postLoad()
Listen to postLoad's from the ORM. |
boolean
|
removeEntry(any entry)
|
boolean
|
removePage(any page)
|
boolean
|
removePermission(any permission)
|
boolean
|
removePermissionGroup(any permissionGroup)
|
any
|
setAPIToken(any APIToken)
|
any
|
setAuthorService(any authorService)
|
any
|
setBiography(any biography)
|
any
|
setEmail(any email)
|
any
|
setEntries(array entries)
|
any
|
setFirstName(any firstName)
|
any
|
setIs2FactorAuth(any is2FactorAuth)
|
any
|
setIsActive(any isActive)
|
any
|
setIsPasswordReset(any isPasswordReset)
|
any
|
setLastLogin(any lastLogin)
|
any
|
setLastName(any lastName)
|
any
|
setLoggedIn(boolean loggedIn)
|
any
|
setNumberOfContentStore(any numberOfContentStore)
|
any
|
setNumberOfEntries(any numberOfEntries)
|
any
|
setNumberOfPages(any numberOfPages)
|
any
|
setPages(array pages)
|
any
|
setPassword(any password)
|
any
|
setPermissionGroups(array permissionGroups)
|
any
|
setPermissionList(any permissionList)
|
Author
|
setPermissions(array permissions)
Override the setPermissions. |
Author
|
setPreference(any name, any value)
Set a preference in the user preferences. |
Author
|
setPreferences(any preferences)
Store a preferences structure or JSON data in the user prefernces. |
any
|
setRole(any role)
|
any
|
setUsername(any username)
|
Methods inherited from class contentbox.models.BaseEntity |
---|
getCreatedDate, getIsDeleted, getModifiedDate, setCreatedDate, setIsDeleted, setModifiedDate |
Methods inherited from class contentbox.models.BaseEntityMethods |
---|
getBaseMemento, getDisplayCreatedDate, getDisplayModifiedDate, isLoaded, preInsert, preUpdate |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
Property Detail |
---|
access
- publicunique
- truerequired
- falsereturntype
- anynotnull
- falseindex
- idx_apitokenlength
- 255serializable
- trueaccess
- publicrequired
- falsefieldtype
- idreturntype
- anyparams
- { allocationSize = 1, sequence = 'authorID_seq' }generator
- nativeserializable
- truesetter
- noaccess
- publicrequired
- falsereturntype
- anyinject
- authorService@cbpersistent
- falseserializable
- trueaccess
- publicrequired
- falsereturntype
- anynotnull
- falseormtype
- textlength
- 8000serializable
- trueaccess
- publicrequired
- falsereturntype
- anynotnull
- trueormtype
- timestampupdate
- falseindex
- idx_createDateserializable
- trueaccess
- publicrequired
- falsereturntype
- anynotnull
- trueindex
- idx_emaillength
- 255serializable
- trueaccess
- publicrequired
- falseinverse
- truefieldtype
- one-to-manyreturntype
- anycascade
- save-updateorderby
- publishedDate DESCbatchsize
- 10singularname
- entryfkcolumn
- FK_authorIDserializable
- truecfc
- contentbox.models.content.Entrylazy
- extraaccess
- publicrequired
- falsereturntype
- anynotnull
- truelength
- 100serializable
- trueaccess
- publicrequired
- falsedbdefault
- 0returntype
- anynotnull
- trueormtype
- booleanindex
- idx_2factorauthserializable
- truesqltype
- bitaccess
- publicrequired
- falsereturntype
- anynotnull
- trueormtype
- booleanindex
- idx_login,idx_activeAuthorserializable
- trueaccess
- publicrequired
- falsedbdefault
- 0returntype
- anynotnull
- trueormtype
- booleanindex
- idx_deletedserializable
- truesqltype
- bitaccess
- publicrequired
- falsedbdefault
- 0returntype
- anynotnull
- trueormtype
- booleanindex
- idx_passwordResetserializable
- truesqltype
- bitaccess
- publicrequired
- falsereturntype
- anynotnull
- falseormtype
- timestampserializable
- trueaccess
- publicrequired
- falsereturntype
- anynotnull
- truelength
- 100serializable
- trueaccess
- publicrequired
- falsereturntype
- anypersistent
- falseserializable
- trueaccess
- publicrequired
- falsereturntype
- anynotnull
- trueormtype
- timestampindex
- idx_modifiedDateserializable
- trueaccess
- publicrequired
- falsereturntype
- anyformula
- select count(*) from cb_content as content
where content.FK_authorID=authorID and content.contentType = 'ContentStore'serializable
- trueaccess
- publicrequired
- falsereturntype
- anyformula
- select count(*) from cb_content as content
where content.FK_authorID=authorID and content.contentType = 'Entry'serializable
- trueaccess
- publicrequired
- falsereturntype
- anyformula
- select count(*) from cb_content as content
where content.FK_authorID=authorID and content.contentType = 'Page'serializable
- trueaccess
- publicrequired
- falseinverse
- truefieldtype
- one-to-manyreturntype
- anycascade
- save-updateorderby
- publishedDate DESCbatchsize
- 10singularname
- pagefkcolumn
- FK_authorIDserializable
- truecfc
- contentbox.models.content.Pagelazy
- extraaccess
- publicrequired
- falsereturntype
- anynotnull
- trueindex
- idx_loginlength
- 100serializable
- truelinktable
- cb_authorPermissionGroupsaccess
- publicrequired
- falsefieldtype
- many-to-manyreturntype
- anycascade
- allorderby
- namesingularname
- permissionGroupfkcolumn
- FK_authorIDserializable
- trueinversejoincolumn
- FK_permissionGroupIDcfc
- contentbox.models.security.PermissionGrouplazy
- extraaccess
- publicrequired
- falsereturntype
- anypersistent
- falseserializable
- truelinktable
- cb_authorPermissionsaccess
- publicrequired
- falsefieldtype
- many-to-manyreturntype
- anycascade
- allorderby
- permissionsingularname
- permissionfkcolumn
- FK_authorIDserializable
- trueinversejoincolumn
- FK_permissionIDcfc
- contentbox.models.security.Permissionlazy
- extraaccess
- publicrequired
- falsereturntype
- anynotnull
- falseormtype
- textlength
- 8000serializable
- trueaccess
- publicrequired
- falsefieldtype
- many-to-onereturntype
- anynotnull
- truefkcolumn
- FK_roleIDserializable
- truecfc
- contentbox.models.security.Rolelazy
- trueaccess
- publicunique
- truerequired
- falsereturntype
- anynotnull
- trueindex
- idx_loginlength
- 100serializable
- trueMethod Detail |
---|
entry
page
permission
permissionGroup
This utility function checks if a slug is in any permission group this user belongs to.
slug
- The slug to checkCheck for permission
slug
- The permission slug or list of slugs to validate the user has. If it's a list then they are ORed togetherClear all permissions
Generate new API Token, stores it locally but does not persist it.
Get all user preferences in inflated format
Get formatted lastLogin
Get a flat representation of this entry
excludes
- Exclude properties, by default it does pages and entriesshowRole
- Show RolesshowPermissions
- Show permissionsshowPermissionGroups
- Show permission groupsRetrieve full name
Shortcut Utlity function to get a list of all the permission groups this user belongs to.
delimiter
Get a preference, you can pass a default value if preference does not exist
name
defaultValue
entry
page
permission
permissionGroup
role
Verify that a passed in list of perms the user can use
list
Utility method to verify if an author has been logged in to the system or not. This method does not account for permissions. Only for logged in status.
Listen to postLoad's from the ORM
entry
page
permission
permissionGroup
APIToken
authorService
biography
email
entries
firstName
is2FactorAuth
isActive
isPasswordReset
lastLogin
lastName
loggedIn
numberOfContentStore
numberOfEntries
numberOfPages
pages
password
permissionGroups
permissionList
Override the setPermissions
permissions
- The permissions array to overrideSet a preference in the user preferences
name
value
Store a preferences structure or JSON data in the user prefernces
preferences
- A struct of data or a JSON packet to storerole
username