|
Package security_api |
| Program units |
| Get_Content_Table | ? |
| Get_Users | Gets the users with user type <> N and different from the application owner |
| Create_User | Creates a new user and return its id |
| Update_User | Updates the specified user |
| Update_User_Name | Updates the name of the specified user |
| Delete_User | Deletes the specified user |
| Change_User_Password | Changes the password of the specified user p_new_password: the new password, crypted |
| Get_User_Groups | Gets the user groups |
| Create_User_Group | Creates a new user group with the given name and returns its id |
| Update_User_Group | Updates the specified user group |
| Delete_User_Group | Deletes the specified user group |
| Create_User_Source | Creates a new user source and returns its id. |
| Update_User_Source | Updates the specified user source. |
| Delete_User_Source | Deletes the specified user source |
| Get_Net_Domains_And_Servers | Returns id, organization, NAME from Ts_User_Sources |
| Get_Available_Users | Returns all available users according to the specified p_user_source_id |
| Import_Network_User | Imports the specified network user as a DI user. |
| Get_Permission_Sets | Gets the permission sets |
| Create_Mask | Creates a new mask and returns its id |
| Update_Mask | Updates the specified mask |
| Delete_Mask | Deletes the specified mask |
| Attach_Users_To_Mask | Sets the specified mask to all specified users |
| Detach_Users_From_Mask | Sets the user_defined_mask_id to NULL to all specified users |
| Insert_Permission_Statement | Creates a new permission statement |
| Delete_Permission_Statement | Deletes permission statements with the specified mask and collection ids |
| Import_Domain_Users | Imports the domain users. |
| Import_Domain_Groups | Imports the domain groups. |
| Exceptions |
| user_not_authorized | Occurs when the user is not properly authorized |
| user_not_admin | Occurs when the user is not an administrator |
| user_not_document_admin | Occurs when the user is not a document group administrator |
| us_name_is_null | Occurs when trying to insert/update NULL into the name of a user source |
| us_server_type_is_null | Occurs when trying to insert/update NULL into the server type of a user source |
| us_host_is_null | Occurs when trying to insert/update NULL into the host of a user source |
| us_port_is_null | Occurs when trying to insert/update NULL into the port of a user source |
| us_username_is_null | Occurs when trying to insert/update NULL into the username of a user source |
| us_password_is_null | Occurs when trying to insert/update NULL into the password of a user source |
| us_organization_is_null | Occurs while inserting/updating a user source, when windows_pdc = 'on' and organization IS NULL |
| user_already_exists | Occurs when trying to insert a user with a name that already exists |
| addNetworkUserToDIUser_Error | Occurs when the adding of a network user as a DI user fails |
| get_domain_users_Error | Occurs when getting the domain users is not ok |
| get_domain_groups_Error | Occurs when getting the domain groups is not ok |
| Types |
| Content_Table_Type |
| Constants |
| sys_collection_name_pref | Prefix of the content collection name |
user_not_authorized
user_not_authorized EXCEPTION;
Occurs when the user is not properly authorized
user_not_admin
user_not_admin EXCEPTION;
Occurs when the user is not an administrator
user_not_document_admin
user_not_document_admin EXCEPTION;
Occurs when the user is not a document group administrator
us_name_is_null
us_name_is_null EXCEPTION;
Occurs when trying to insert/update NULL into the name of a user source
us_server_type_is_null
us_server_type_is_null EXCEPTION;
Occurs when trying to insert/update NULL into the server type of a user source
us_host_is_null
us_host_is_null EXCEPTION;
Occurs when trying to insert/update NULL into the host of a user source
us_port_is_null
us_port_is_null EXCEPTION;
Occurs when trying to insert/update NULL into the port of a user source
us_username_is_null
us_username_is_null EXCEPTION;
Occurs when trying to insert/update NULL into the username of a user source
us_password_is_null
us_password_is_null EXCEPTION;
Occurs when trying to insert/update NULL into the password of a user source
us_organization_is_null
us_organization_is_null EXCEPTION;
Occurs while inserting/updating a user source, when windows_pdc = 'on' and organization IS NULL
user_already_exists
user_already_exists EXCEPTION;
Occurs when trying to insert a user with a name that already exists
addNetworkUserToDIUser_Error
addNetworkUserToDIUser_Error EXCEPTION;
Occurs when the adding of a network user as a DI user fails
get_domain_users_Error
get_domain_users_Error EXCEPTION;
Occurs when getting the domain users is not ok
get_domain_groups_Error
get_domain_groups_Error EXCEPTION;
Occurs when getting the domain groups is not ok
Content_Table_Type
TYPE Content_Table_Type IS TABLE OF VARCHAR2(100);
sys_collection_name_pref
sys_collection_name_pref CONSTANT VARCHAR2(20) := 'COLLECTION_';
Prefix of the content collection name
Get_Content_Table
Function Get_Content_Table(p_content_id CLOB) RETURN Content_Table_Type
?
Get_Users
Function Get_Users(p_username IN VARCHAR2,
p_password IN VARCHAR2,
first_record NUMBER DEFAULT 0,
records NUMBER DEFAULT 10,
row_count OUT NUMBER) RETURN DBMS_SQL.VARCHAR2S
Gets the users with user type <> N and different from the application owner
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| first_record |
The number of the first record to be returned | |
| records |
The number of records to be returned | |
| row_count |
The total count of users with user type <> N and different from the application owner |
Create_User
Function Create_User(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_new_user_name IN VARCHAR2,
p_new_user_password IN VARCHAR2,
p_first_name IN VARCHAR2 DEFAULT '',
p_last_name IN VARCHAR2 DEFAULT '')
RETURN NUMBER
Creates a new user and return its id
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_new_user_name |
The name of the user being created | |
| p_new_user_password |
The password of the user being created | |
| p_first_name |
The first name of the user being created | |
| p_last_name |
The last name of the user being created |
Update_User
Procedure Update_User(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_id IN NUMBER,
p_name IN VARCHAR2,
p_first_name IN VARCHAR2 DEFAULT '',
p_last_name IN VARCHAR2 DEFAULT '',
p_can_check_who_can_see IN VARCHAR2 DEFAULT 'NO')
Updates the specified user
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_id |
The id of the user being updated | |
| p_name |
The new name of the user being updated | |
| p_first_name |
The first name of the user being updated | |
| p_last_name |
The last name of the user being updated | |
| p_can_check_who_can_see |
Indicates whether the user can view 'Who can see it?' information |
Update_User_Name
Procedure Update_User_Name(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_id IN NUMBER,
p_new_name IN VARCHAR2)
Updates the name of the specified user
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_id |
The id of the user being updated | |
| p_new_name |
The new name of the user being updated |
Delete_User
Procedure Delete_User(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_id IN NUMBER)
Deletes the specified user
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_id |
The id of the user being deleted |
Change_User_Password
Procedure Change_User_Password(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_id IN NUMBER,
p_new_password IN VARCHAR2)
Changes the password of the specified user p_new_password: the new password, crypted
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_id |
The id of the user whose password is being changed | |
| p_new_password |
The new password, crypted |
Get_User_Groups
Function Get_User_Groups(p_username IN VARCHAR2,
p_password IN VARCHAR2,
first_record NUMBER DEFAULT 0,
records NUMBER DEFAULT 10,
row_count OUT NUMBER) RETURN DBMS_SQL.VARCHAR2S
Gets the user groups
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| first_record |
The number of the first record to be returned | |
| records |
The number of records to be returned | |
| row_count |
The total count of user groups |
Create_User_Group
Function Create_User_Group(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_name IN VARCHAR2) RETURN NUMBER
Creates a new user group with the given name and returns its id
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_name |
The name of the user grouup to be created |
Update_User_Group
Procedure Update_User_Group(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_id IN NUMBER,
p_new_name IN VARCHAR2)
Updates the specified user group
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_id |
The id of the user group to be updated | |
| p_new_name |
The new name of the user group |
Delete_User_Group
Procedure Delete_User_Group(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_id IN NUMBER)
Deletes the specified user group
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_id |
The id of the user group to be deleted |
Create_User_Source
Function Create_User_Source(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_name IN VARCHAR2,
p_server_type IN NUMBER DEFAULT 2,
p_host IN VARCHAR2,
p_port IN NUMBER DEFAULT 389,
p_new_username IN VARCHAR2,
p_new_password IN VARCHAR2,
p_base IN VARCHAR2 DEFAULT '',
p_is_windows_pdc IN VARCHAR2,
p_organization IN VARCHAR2) RETURN NUMBER
Creates a new user source and returns its id.
Possible exceptions: us_name_is_null, us_server_type_is_null, us_host_is_null, us_port_is_null, us_username_is_null, us_password_is_null, us_organization_is_null
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_name |
The name of the user source | |
| p_server_type |
The server type of the user source | |
| p_host |
The host of the user source | |
| p_port |
The port of the user source | |
| p_new_username |
User | |
| p_new_password |
Password | |
| p_base |
Base ??? | |
| p_is_windows_pdc |
Is Windows Primary Domain Controller | |
| p_organization |
Organisation of the user source |
Update_User_Source
Procedure Update_User_Source(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_id IN NUMBER,
p_name IN VARCHAR2,
p_server_type IN NUMBER DEFAULT 2,
p_host IN VARCHAR2,
p_port IN NUMBER DEFAULT 389,
p_new_username IN VARCHAR2,
p_new_password IN VARCHAR2,
p_base IN VARCHAR2 DEFAULT '',
p_is_windows_pdc IN VARCHAR2,
p_organization IN VARCHAR2)
Updates the specified user source.
Possible exceptions: us_name_is_null, us_server_type_is_null, us_host_is_null, us_port_is_null, us_username_is_null, us_password_is_null, us_organization_is_null
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_id |
The id of the user source being updated | |
| p_name |
The name of the user source | |
| p_server_type |
The server type of the user source | |
| p_host |
The host of the user source | |
| p_port |
The port of the user source | |
| p_new_username |
User | |
| p_new_password |
Password | |
| p_base |
Base ??? | |
| p_is_windows_pdc |
Is Windows Primary Domain Controller | |
| p_organization |
Organisation of the user source |
Delete_User_Source
Procedure Delete_User_Source(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_id IN NUMBER)
Deletes the specified user source
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_id |
The id of the user source being deleted |
Get_Net_Domains_And_Servers
Function Get_Net_Domains_And_Servers(p_username IN VARCHAR2,
p_password IN VARCHAR2)
RETURN DBMS_SQL.VARCHAR2S
Returns id, organization, NAME from Ts_User_Sources
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation |
Get_Available_Users
Function Get_Available_Users(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_user_source_id IN NUMBER)
RETURN DBMS_SQL.VARCHAR2S
Returns all available users according to the specified p_user_source_id
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_user_source_id |
The id of the user source that filter the users |
Import_Network_User
Procedure Import_Network_User(p_username IN VARCHAR2,
p_password IN VARCHAR2,
net_user_id IN NUMBER,
net_user_password IN VARCHAR2,
mssg OUT VARCHAR2)
Imports the specified network user as a DI user.
Possible exceptions: user_already_exists, addNetworkUserToDIUser_Error
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| net_user_id |
The id of the network user we want to import | |
| net_user_password |
The password of the network user we want to import | |
| mssg |
This parameter is useful if an exception occurs |
Get_Permission_Sets
Function Get_Permission_Sets(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_first_record IN NUMBER DEFAULT 0,
p_records IN NUMBER DEFAULT 10,
p_row_count OUT NUMBER)
RETURN DBMS_SQL.VARCHAR2S
Gets the permission sets
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_first_record |
The number of the first record to be returned | |
| p_records |
The number of records to be returned | |
| p_row_count |
The total count of user groups |
Create_Mask
Function Create_Mask(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_name IN VARCHAR2,
p_description IN VARCHAR2 DEFAULT NULL,
p_user_id IN NUMBER DEFAULT NULL) RETURN NUMBER
Creates a new mask and returns its id
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_name |
The name of the mask being created | |
| p_description |
The description of the mask being created | |
| p_user_id |
The id of the user that initiated the mask being created |
Update_Mask
Procedure Update_Mask(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_id IN NUMBER,
p_name IN VARCHAR2,
p_description IN VARCHAR2 DEFAULT NULL,
p_user_id IN NUMBER DEFAULT NULL)
Updates the specified mask
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_id |
The id of the mask being updated | |
| p_name |
The new name of the mask being updated | |
| p_description |
The new description of the mask being updated | |
| p_user_id |
The new id of the user that initiated the mask being updated |
Delete_Mask
Procedure Delete_Mask(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_id IN NUMBER)
Deletes the specified mask
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_id |
The id of the mask being deleted |
Attach_Users_To_Mask
Procedure Attach_Users_To_Mask(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_user_id owa.vc_arr,
p_mask_id NUMBER)
Sets the specified mask to all specified users
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_user_id |
An array with user ids to which to attach the specified mask | |
| p_mask_id |
The mask id to be set as user defined mask id to the users in the p_user_id array |
Detach_Users_From_Mask
Procedure Detach_Users_From_Mask(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_user_id owa.vc_arr)
Sets the user_defined_mask_id to NULL to all specified users
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_user_id |
An array with user ids whose user defined mask ids will be detached (set to NULL) |
Insert_Permission_Statement
Procedure Insert_Permission_Statement(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_mask_id owa.vc_arr,
p_content_id owa.vc_arr,
p_visibility VARCHAR2,
p_type NUMBER,
p_created_by NUMBER,
p_mask_user owa.vc_arr,
p_systimestamp TIMESTAMP,
p_group_permission_stmnt_id NUMBER)
Creates a new permission statement
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_mask_id |
An array of mask ids for which to create permission statements | |
| p_content_id |
An array of content ids (e.g. di_document_group_ids in ts_di_group_collect_members) | |
| p_visibility |
Visibility for the selected contents | |
| p_type |
Type of the collection | |
| p_created_by |
User by whom the permission statement is created | |
| p_mask_user |
An array of mask user ids | |
| p_systimestamp |
Indicates when the permission statement is created | |
| p_group_permission_stmnt_id |
The id of the group permission statent |
Delete_Permission_Statement
Procedure Delete_Permission_Statement(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_mask_id NUMBER,
p_collection_id NUMBER)
Deletes permission statements with the specified mask and collection ids
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_mask_id |
The mask id of the mask collections to be deleted | |
| p_collection_id |
The collection id of the mask collections to be deleted |
Import_Domain_Users
Procedure Import_Domain_Users(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_user_source_id IN NUMBER,
mssg OUT VARCHAR2)
Imports the domain users.
Possible exceptions: get_domain_users_Error
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_user_source_id |
The id of the user source from which the users will be imported | |
| mssg |
This parameter is useful if an exception occurs |
Import_Domain_Groups
Procedure Import_Domain_Groups(p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_user_source_id NUMBER,
mssg OUT VARCHAR2)
Imports the domain groups.
Possible exceptions: get_domain_groups_Error
| Parameters |
| p_username |
The name of the directinfo user that is used for authorisation | |
| p_password |
The password of the directinfo user that is used for authorisation | |
| p_user_source_id |
The id of the user source from which the groups will be imported | |
| mssg |
This parameter is useful if an exception occurs |