The AccessProfile class has been added to the DOCUMENTS PortalScripting API to gain full access to the DOCUMENTS access profiles by scripting means.
More...
The AccessProfile class has been added to the DOCUMENTS PortalScripting API to gain full access to the DOCUMENTS access profiles by scripting means.
A SystemUser can be assigned to an AccessProfile. At the filetype it is possible to define several rights depending on the AccessProfile. You can get an AccessProfile object by different methods like Context.findAccessProfile(String ProfileName) or from the AccessProfileIterator.
- Since
- ELC 3.50b / otrisPORTAL 5.0b
◆ AccessProfile()
AccessProfile AccessProfile::AccessProfile |
( |
String |
nameAccessProfile | ) |
|
With the new method is it possible to create a new AccessProfile.
If an access profile with the profile name already exist, the method return the existing access profile.
- Returns
- The new created AccessProfile object. If the creation fails, the method returns NULL.
- Example:
if (!newAP)
util.out("Creation of AccessProfile failed.");
- Since
- ELC 3.50b / otrisPORTAL 5.0b
- Deprecated:
- since ELC 3.60i / otrisPORTAL 6.0i use Context.createAccessProfile() instead
◆ addCustomProperty()
CustomProperty AccessProfile::addCustomProperty |
( |
String |
name, |
|
|
String |
type, |
|
|
String |
value |
|
) |
| |
◆ getAttribute()
String AccessProfile::getAttribute |
( |
String |
attribute | ) |
|
Get the String value of an attribute of the AccessProfile.
- Parameters
-
attribute | String containing the name of the desired attribute |
- Returns
- String containing the value of the desired attribute
- Note
- This function is only for experts. Knowledge about the ELC-database schema is necessary!
- Since
- ELC 3.50b / otrisPORTAL 5.0b
◆ getCustomProperties()
◆ getLastError()
String AccessProfile::getLastError |
( |
| ) |
|
If you call a method at an AccessProfile object and an error occurred, you can get the error description with this function.
- Returns
- Text of the last error as String
- Since
- ELC 3.50b / otrisPORTAL 5.0b
- See also
- DocFile.getLastError()
◆ getOID()
String AccessProfile::getOID |
( |
boolean |
oidLow = false | ) |
|
Returns the object-id.
- Parameters
-
oidLow | Optional flag:
If true only the id of the AccessProfile object (m_oid ) will be returned.
If false the id of the AccessProfile object will be returned together with the id of the corresponding class in the form class-id:m_oid .
The default value is false . |
- Returns
String
with the object-id
- Since
- ELC 3.60c / otrisPORTAL 6.0c
-
DOCUMENTS 5.0 (new parameter
oidLow
)
◆ getSystemUsers()
SystemUserIterator AccessProfile::getSystemUsers |
( |
boolean |
includeLockedUsers = true , |
|
|
boolean |
includeInvisibleUsers = true |
|
) |
| |
Retrieve a list of desired SystemUser which are assigned to the current AccessProfile.
- Parameters
-
includeLockedUsers | Optional flag indicating whether locked users also should be returned. The default value is true . |
includeInvisibleUsers | Optional flag indicating whether the method also should return users for which the option "Display user in DOCUMENTS lists" in the Documents Manager is not checkmarked. The default value is true . |
- Returns
- SystemUserIterator containing a list of SystemUser
- Example:
var ap = context.findAccessProfile("supportteam");
if (ap)
{
var itSU = ap.getSystemUsers();
for (var su = itSU.first(); su; su = itSU.next())
util.out(su.login);
}
else
util.out("AccessProfile does not exist.");
- Since
- ELC 3.51e / otrisPORTAL 5.1e
-
DOCUMENTS 5.0c HF2 (new parameters
includeLockedUsers
and includeInvisibleUsers
)
◆ setAttribute()
boolean AccessProfile::setAttribute |
( |
String |
attribute, |
|
|
String |
value |
|
) |
| |
Set the String value of an attribute of the AccessProfile to the desired value.
- Parameters
-
attribute | String containing the name of the desired attribute |
value | String containing the desired value of the attribute |
- Returns
true
if successful, false
in case of any error
- Note
- This function is only for experts. Knowledge about the ELC-database schema is necessary!
- Since
- ELC 3.50b / otrisPORTAL 5.0b
◆ setOrAddCustomProperty()
CustomProperty AccessProfile::setOrAddCustomProperty |
( |
String |
name, |
|
|
String |
type, |
|
|
String |
value |
|
) |
| |
◆ setParentProfile()
boolean AccessProfile::setParentProfile |
( |
AccessProfile |
parentProfile | ) |
|
Set the parent profile of the current profile.
- Parameters
-
parentProfile | optional AccessProfile object being the parent profile of the current profile. If no parent profile is defined, the current profile will be moved to the top level. |
- Returns
true
if successful, false
in case of any error
- Since
- DOCUMENTS 5.0d
- Example:
var parentProfile = context.createAccessProfile("parentProfile");
if (parentProfile)
{
var subProfile = context.createAccessProfile("subProfile");
if (subProfile)
{
var success = subProfile.setParentProfile(parentProfile);
if (!success)
util.out(subProfile.getLastError());
success = subProfile.setParentProfile();
}
}
◆ name
String AccessProfile::name |
The technical name of the AccessProfile.
- Returns
- String containing the technical name of the AccessProfile.
- Since
- ELC 3.50b / otrisPORTAL 5.0b
- Example:
var su = context.getSystemUser();
if (su)
{
var apIter = su.getAccessProfiles();
for (var ap = apIter.first(); ap; ap = apIter.next())
{
util.out(ap.name);
}
}
◆ propCache