Package ru.bgcrm.model.user
Class User
java.lang.Object
org.bgerp.model.base.Id
org.bgerp.model.base.IdTitle
ru.bgcrm.model.user.User
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<User>,Id<Integer>,IdTitle<Integer>,Title,UserAccount
- Direct Known Subclasses:
UserAccount
Application user.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks ifactionallowed in user permissions.clone()intGroup IDs active on the current date.getLogin()Gets user permission for action.intList of users, fist is the current one.booleanisAdmin()voidvoidsetDescription(String description) voidsetGroupIds(Set<Integer> groupIds) voidvoidsetPassword(String password) voidsetPermsetIds(List<Integer> permsetIds) voidsetPersonalization(String personalization) voidsetQueueIds(Set<Integer> queueIds) voidsetStatus(int status)
-
Field Details
-
OBJECT_TYPE
- See Also:
-
USER_SYSTEM_ID
public static final int USER_SYSTEM_ID- See Also:
-
USER_CUSTOMER_ID
public static final int USER_CUSTOMER_ID- See Also:
-
USER_SYSTEM
-
USER_CUSTOMER
-
STATUS_ACTIVE
public static final int STATUS_ACTIVEActive user.- See Also:
-
STATUS_DISABLED
public static final int STATUS_DISABLEDBlocked user.- See Also:
-
STATUS_EXTERNAL
public static final int STATUS_EXTERNALUser provided from external auth system. Is active, but shouldn't be edited in the current one.- See Also:
-
-
Constructor Details
-
User
public User() -
User
-
-
Method Details
-
isAdmin
public boolean isAdmin()- Returns:
- is the user admin with
Id.getId()equals1.
-
getLogin
- Specified by:
getLoginin interfaceUserAccount
-
setLogin
-
getPassword
- Specified by:
getPasswordin interfaceUserAccount
-
setPassword
-
getStatus
public int getStatus() -
setStatus
public void setStatus(int status) -
getDescription
-
setDescription
-
getGroupIds
Group IDs active on the current date.- Returns:
-
setGroupIds
-
getPermsetIds
-
setPermsetIds
-
getQueueIds
-
setQueueIds
-
getConfig
-
setConfig
-
getConfigMap
-
getPersonalization
-
setPersonalization
-
getPersonalizationMap
-
compareTo
- Specified by:
compareToin interfaceComparable<User>
-
clone
-
getUserListWithSameGroups
List of users, fist is the current one. After collected fromUserCache.getUserList()users with intersected groups with the current one.- Returns:
-
checkPerm
Checks ifactionallowed in user permissions.- Parameters:
action- semicolon separated action class and method, e.g.org.bgerp.plugin.bil.invoice.action.InvoiceAction:get.- Returns:
- is the action allowed.
-
getPerm
Gets user permission for action.- Parameters:
action- semicolon separated action class name and method, e.g.org.bgerp.plugin.bil.invoice.action.InvoiceAction:get.- Returns:
- allowed permission with options or
null.
-