Class SuperUserClientSideElement
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.ui.StaticFileImportsClientSideElement
-
- org.ametys.core.ui.StaticClientSideElement
-
- org.ametys.runtime.plugins.admin.superuser.SuperUserClientSideElement
-
- All Implemented Interfaces:
ClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
- Direct Known Subclasses:
SuperUserClientSideElement
public class SuperUserClientSideElement extends StaticClientSideElement
This implementation creates a control allowing to affect a super user to a given context
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
-
-
Field Summary
Fields Modifier and Type Field Description protected ProfileAssignmentStorageExtensionPoint
_profileAssignmentStorageEP
The profile assignments storageprotected RightProfilesDAO
_profilesDAO
The profiles DAOprotected RightAssignmentContextExtensionPoint
_rightCtxEP
The extension point for right contextsprotected RightsExtensionPoint
_rightsEP
The extension point for the rightsprotected ServiceManager
_sManager
The service managerprotected UserHelper
_userHelper
The user helper-
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
-
Constructor Summary
Constructors Constructor Description SuperUserClientSideElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
affectUserToNewProfile(Map<String,String> user, String newProfileName, Map<String,Object> jsParameters)
Affect a user to a new super profile on the given context.void
affectUserToProfile(Map<String,String> user, String profileId, Map<String,Object> jsParameters)
Affect a user to the given profile on the given contextprotected Map<String,Object>
getContextualParameters(Map<String,Object> jsParameters)
Get the contextual parameters used to determines the root contextsvoid
service(ServiceManager smanager)
-
Methods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureClass, _configureParameters, _configureScript, configureInitialParameters
-
Methods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toString
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_sManager
protected ServiceManager _sManager
The service manager
-
_rightsEP
protected RightsExtensionPoint _rightsEP
The extension point for the rights
-
_profilesDAO
protected RightProfilesDAO _profilesDAO
The profiles DAO
-
_profileAssignmentStorageEP
protected ProfileAssignmentStorageExtensionPoint _profileAssignmentStorageEP
The profile assignments storage
-
_rightCtxEP
protected RightAssignmentContextExtensionPoint _rightCtxEP
The extension point for right contexts
-
_userHelper
protected UserHelper _userHelper
The user helper
-
-
Constructor Detail
-
SuperUserClientSideElement
public SuperUserClientSideElement()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticFileImportsClientSideElement
- Throws:
ServiceException
-
affectUserToProfile
public void affectUserToProfile(Map<String,String> user, String profileId, Map<String,Object> jsParameters)
Affect a user to the given profile on the given context- Parameters:
user
- The userprofileId
- The profile idjsParameters
- The client-side parameters
-
affectUserToNewProfile
public String affectUserToNewProfile(Map<String,String> user, String newProfileName, Map<String,Object> jsParameters)
Affect a user to a new super profile on the given context. First, a new profile with the given name will be created and filled with all rights, and then the user will be affected.- Parameters:
user
- The usernewProfileName
- The name of the super profile to createjsParameters
- The client-side parameters- Returns:
- The id of the created profile
-
-