|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.molgenis.omx.auth.DatabaseLogin
public class DatabaseLogin
| Field Summary | |
|---|---|
protected String |
redirect
|
| Fields inherited from interface org.molgenis.framework.security.Login |
|---|
GROUP_SYSTEM_NAME, GROUP_USERS_NAME, USER_ADMIN_NAME, USER_ANONYMOUS_NAME, USER_ANONYMOUS_PASSWORD |
| Constructor Summary | |
|---|---|
DatabaseLogin(Database db,
String redirect,
TokenFactory tm)
|
|
DatabaseLogin(Database db,
TokenFactory tm)
Constructor used to login anonymous |
|
DatabaseLogin(TokenFactory tm)
|
|
| Method Summary | |
|---|---|
boolean |
canRead(Class<? extends Entity> entityClass)
|
boolean |
canRead(Entity entity)
Indicates whether the user has permissions to read data from this entity. |
boolean |
canRead(ScreenController<?> screen)
|
boolean |
canReadScreenController(Class<? extends ScreenController<?>> screenControllerClass)
|
boolean |
canWrite(Class<? extends Entity> entityClass)
|
boolean |
canWrite(Entity entity)
Indicates whether the user has permissions to write (and read) data from this entity. |
String |
getFullUserName()
|
String |
getRedirect()
|
QueryRule |
getRowlevelSecurityFilters(Class<? extends Entity> klazz)
Deprecated. |
Integer |
getUserId()
|
String |
getUserName()
|
boolean |
isAuthenticated()
Note: Anonymous is automatically logged in but does not count as being authenticated |
boolean |
isLoginRequired()
|
boolean |
login(Database db,
String name,
String password)
|
void |
logout(Database db)
|
boolean |
owns(Class<? extends Entity> entityClass)
|
boolean |
owns(Entity entity)
|
void |
reload(Database db)
Reloads all permission settings for this user from database. |
void |
setAdmin(List<? extends Entity> entities,
Database db)
|
void |
setRedirect(String redirect)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String redirect
| Constructor Detail |
|---|
public DatabaseLogin(TokenFactory tm)
public DatabaseLogin(Database db,
TokenFactory tm)
throws Exception
db - database to log in to.
Exception
public DatabaseLogin(Database db,
String redirect,
TokenFactory tm)
throws Exception
Exception| Method Detail |
|---|
public Integer getUserId()
getUserId in interface Loginpublic String getUserName()
getUserName in interface Loginpublic String getFullUserName()
public boolean isAuthenticated()
isAuthenticated in interface Login
public boolean login(Database db,
String name,
String password)
throws Exception
login in interface LoginException
public void logout(Database db)
throws Exception
logout in interface LoginException
public void reload(Database db)
throws Exception
reload in interface LoginExceptionpublic String toString()
toString in class Objectpublic boolean isLoginRequired()
isLoginRequired in interface Loginpublic QueryRule getRowlevelSecurityFilters(Class<? extends Entity> klazz)
getRowlevelSecurityFilters in interface Login
public boolean canRead(Class<? extends Entity> entityClass)
throws DatabaseException
canRead in interface LoginDatabaseException
public boolean canWrite(Class<? extends Entity> entityClass)
throws DatabaseException
canWrite in interface LoginDatabaseException
public boolean owns(Class<? extends Entity> entityClass)
throws DatabaseException
DatabaseException
public boolean canRead(Entity entity)
throws DatabaseException
canRead in interface LoginEntity - the entity to get permission from
DatabaseException
DatabaseException
public boolean canWrite(Entity entity)
throws DatabaseException
canWrite in interface LoginEntity - the entity to get permission from
DatabaseException
DatabaseException
public boolean owns(Entity entity)
throws DatabaseException
DatabaseExceptionpublic boolean canReadScreenController(Class<? extends ScreenController<?>> screenControllerClass)
canReadScreenController in interface Loginpublic boolean canRead(ScreenController<?> screen)
canRead in interface Loginpublic String getRedirect()
getRedirect in interface Login
public void setAdmin(List<? extends Entity> entities,
Database db)
throws DatabaseException
setAdmin in interface LoginDatabaseExceptionpublic void setRedirect(String redirect)
setRedirect in interface Login
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||