public class PermissionSql extends AbstractSql
CREATE TABLE "perm" ( propid | character varying(255) | user | character varying(255) | permision | smallint | su | boolean |In this setup, the columns have the following meanings:
TaskSql table.UserSql user-id.AbstractSql.Columns, AbstractSql.ExtractPropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFPERMISSIONFIELD
The key to the object name in the database.
|
private static String |
DEFPROPIDFIELD
The key to the object name in the database.
|
private static String |
DEFSUFIELD
The key to the object name in the database.
|
private static String |
DEFTABLE
The default table name.
|
private static String |
DEFUSERFIELD
The key to the object name in the database.
|
static String |
KEY_PERMISSIONFIELD
The key to the object name in the database.
|
static String |
KEY_PROPIDFIELD
The key to the object name in the database.
|
static String |
KEY_SUFIELD
The key to the object name in the database.
|
static String |
KEY_USERFIELD
The key to the object name in the database.
|
KEY_TABLE, SQLBATCHDIR, SQLFAILDIRKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOMECONFIG, KEY_CLASS| Constructor and Description |
|---|
PermissionSql(Map<String,String> prop)
Constructs a new proposal sql.
|
| Modifier and Type | Method and Description |
|---|---|
PermissionCollection |
addProposalPermissions(PermissionCollection permit,
String user)
Add to a
PermissionCollection the permissions for the user on all
additional proposals. |
boolean |
setMainUserPermission(String proposal,
String pi)
For the pi, we set all permission to true plus the su-filed.
|
private boolean |
setRow(String prop,
String user,
short perm,
boolean su) |
boolean |
setTeamUserPermission(String proposal,
String coi)
Set permissions for a standard user (team member).
|
boolean |
setUserPermission(String proposal,
String coi,
EnumSet<DataPermission.Access> perms) |
delete, distinct, distinct, exit, getAccess, getDefaultArchive, getDefaultFormat, getTable, init, insert, isEntry, release, release, replace, retrieve, retrieve, retrieve, single, singleclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, parseObject, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringPropertiespublic static final String KEY_PROPIDFIELD
public static final String KEY_USERFIELD
public static final String KEY_PERMISSIONFIELD
public static final String KEY_SUFIELD
private static final String DEFTABLE
private static final String DEFPROPIDFIELD
private static final String DEFUSERFIELD
private static final String DEFPERMISSIONFIELD
private static final String DEFSUFIELD
public PermissionCollection addProposalPermissions(PermissionCollection permit, String user)
PermissionCollection the permissions for the user on all
additional proposals. The database is queried and permissions in the form
of
:user:propid,Please note that expired targets are not added here, refer to
#addExpiredPermissionsSecurityException - if the permission collection is read-only.public boolean setMainUserPermission(String proposal, String pi)
public boolean setTeamUserPermission(String proposal, String coi)
public boolean setUserPermission(String proposal, String coi, EnumSet<DataPermission.Access> perms)