public class KettleDatabaseRepositorySecurityProvider extends BaseRepositorySecurityProvider implements RepositorySecurityProvider, RepositorySecurityManager, RepositorySecurityUserValidator
Constructor and Description |
---|
KettleDatabaseRepositorySecurityProvider(KettleDatabaseRepository repository,
RepositoryMeta repositoryMeta,
IUser userInfo) |
Modifier and Type | Method and Description |
---|---|
boolean |
allowsVersionComments(String fullPath) |
IUser |
constructUser() |
void |
deleteUsers(List<IUser> users) |
void |
delUser(org.pentaho.di.repository.ObjectId id_user) |
void |
delUser(String name) |
List<String> |
getAllRoles()
Retrieves all roles in the system
|
List<String> |
getAllUsers()
Retrieves all users in the system
|
org.pentaho.di.repository.ObjectId |
getUserID(String login) |
org.pentaho.di.repository.ObjectId[] |
getUserIDs() |
String[] |
getUserLogins() |
List<IUser> |
getUsers() |
boolean |
isLockingPossible() |
boolean |
isManaged() |
boolean |
isReadOnly() |
boolean |
isVersionCommentMandatory() |
boolean |
isVersioningEnabled(String fullPath)
Determines whether versioning should be enabled in the UI for the given fully qualified file/path.
|
IUser |
loadUserInfo(String login) |
void |
normalizeUserInfo(IUser user)
Performs normalization over
user due to validation rules.
Note: normalized is not guaranteed to pass validation rules |
void |
renameUser(org.pentaho.di.repository.ObjectId id_user,
String newname) |
void |
saveUserInfo(IUser userInfo)
This method creates new user after all validations have been done.
|
void |
setUsers(List<IUser> users) |
void |
updateUser(IUser user) |
void |
validateAction(RepositoryOperation... operations)
Validates the supplied operation.
|
boolean |
validateUserInfo(IUser user)
Validates
user and returns true if all its data is valid.Note: this method performs fail-fast approach and does not return any details. |
getRepositoryMeta, getUserInfo, setRepositoryMeta
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getUserInfo
public KettleDatabaseRepositorySecurityProvider(KettleDatabaseRepository repository, RepositoryMeta repositoryMeta, IUser userInfo)
repository
- userInfo
- public boolean isReadOnly()
isReadOnly
in interface RepositorySecurityProvider
public boolean isLockingPossible()
isLockingPossible
in interface RepositorySecurityProvider
public boolean allowsVersionComments(String fullPath)
allowsVersionComments
in interface RepositorySecurityProvider
public boolean isVersionCommentMandatory()
isVersionCommentMandatory
in interface RepositorySecurityProvider
public IUser loadUserInfo(String login) throws org.pentaho.di.core.exception.KettleException
loadUserInfo
in interface RepositorySecurityManager
org.pentaho.di.core.exception.KettleException
public void saveUserInfo(IUser userInfo) throws org.pentaho.di.core.exception.KettleException
saveUserInfo
in interface RepositorySecurityManager
userInfo
- user's infoorg.pentaho.di.core.exception.KettleException
IllegalArgumentException
- if userInfo.getObjectId() != null
public void validateAction(RepositoryOperation... operations) throws org.pentaho.di.core.exception.KettleException, org.pentaho.di.core.exception.KettleSecurityException
RepositorySecurityProvider
validateAction
in interface RepositorySecurityProvider
validateAction
in class BaseRepositorySecurityProvider
org.pentaho.di.core.exception.KettleSecurityException
- in case the provided user is not know or the password is incorrectorg.pentaho.di.core.exception.KettleException
- in case the action couldn't be validated because of an unexpected problem.public void delUser(org.pentaho.di.repository.ObjectId id_user) throws org.pentaho.di.core.exception.KettleException
delUser
in interface RepositorySecurityManager
org.pentaho.di.core.exception.KettleException
public org.pentaho.di.repository.ObjectId getUserID(String login) throws org.pentaho.di.core.exception.KettleException
getUserID
in interface RepositorySecurityManager
org.pentaho.di.core.exception.KettleException
public org.pentaho.di.repository.ObjectId[] getUserIDs() throws org.pentaho.di.core.exception.KettleException
getUserIDs
in interface RepositorySecurityManager
org.pentaho.di.core.exception.KettleException
public String[] getUserLogins() throws org.pentaho.di.core.exception.KettleException
getUserLogins
in interface RepositorySecurityProvider
org.pentaho.di.core.exception.KettleException
public void renameUser(org.pentaho.di.repository.ObjectId id_user, String newname) throws org.pentaho.di.core.exception.KettleException
renameUser
in interface RepositorySecurityManager
org.pentaho.di.core.exception.KettleException
public void deleteUsers(List<IUser> users) throws org.pentaho.di.core.exception.KettleException
deleteUsers
in interface RepositorySecurityManager
org.pentaho.di.core.exception.KettleException
public List<IUser> getUsers() throws org.pentaho.di.core.exception.KettleException
getUsers
in interface RepositorySecurityManager
org.pentaho.di.core.exception.KettleException
public void setUsers(List<IUser> users) throws org.pentaho.di.core.exception.KettleException
setUsers
in interface RepositorySecurityManager
org.pentaho.di.core.exception.KettleException
public void delUser(String name) throws org.pentaho.di.core.exception.KettleException
delUser
in interface RepositorySecurityManager
org.pentaho.di.core.exception.KettleException
public void updateUser(IUser user) throws org.pentaho.di.core.exception.KettleException
updateUser
in interface RepositorySecurityManager
org.pentaho.di.core.exception.KettleException
public IUser constructUser() throws org.pentaho.di.core.exception.KettleException
constructUser
in interface RepositorySecurityManager
org.pentaho.di.core.exception.KettleException
public List<String> getAllRoles() throws org.pentaho.di.core.exception.KettleException
RepositorySecurityProvider
getAllRoles
in interface RepositorySecurityProvider
org.pentaho.di.core.exception.KettleSecurityException
- in case anything went wrongorg.pentaho.di.core.exception.KettleException
public List<String> getAllUsers() throws org.pentaho.di.core.exception.KettleException
RepositorySecurityProvider
getAllUsers
in interface RepositorySecurityProvider
org.pentaho.di.core.exception.KettleSecurityException
- in case anything went wrongorg.pentaho.di.core.exception.KettleException
public boolean isManaged() throws org.pentaho.di.core.exception.KettleException
isManaged
in interface RepositorySecurityManager
org.pentaho.di.core.exception.KettleException
public boolean isVersioningEnabled(String fullPath)
RepositorySecurityProvider
isVersioningEnabled
in interface RepositorySecurityProvider
public boolean validateUserInfo(IUser user)
RepositorySecurityUserValidator
user
and returns true
if all its data is valid.validateUserInfo
in interface RepositorySecurityUserValidator
user
- user's infotrue
or false
depending on whether or not user's info is validpublic void normalizeUserInfo(IUser user)
RepositorySecurityUserValidator
user
due to validation rules.
Note: normalized is not guaranteed to pass validation rulesnormalizeUserInfo
in interface RepositorySecurityUserValidator
user
- user's info