Namespace: Consultingwerk.SmartFramework.Authorization
Class 
SecurityService Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object
Implements: Consultingwerk.OERA.IBusinessService, Consultingwerk.SmartFramework.Authorization.ISecurityService

File:SecurityService
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Mon Jul 29 02:38:10 CEST 2013
Notes:This service is intended to run on the appserver or
a client-server session



Top Method Summary
Options Name Purpose
# DetermineUserGuid () Determines the Guid of the current user
+ CHARACTER GetGroupRestrictedDefaultLevel (character, character, character) Returns the level on which a security item is restricted for a given group
+ CHARACTER GetGroupRestrictedDefaultLevel (character, character, character, character) Returns the level on which a security item is restricted for a given group
+ CHARACTER GetGroupRestrictedDefaultLevel (character, character, character, character, character) Returns the level on which a security item is restricted for a given group
+ GetGroupRestrictedDefaultLevel (GetGroupRestrictedDefaultLevelParameter) Returns the level on which a security item is restricted for a given group
+ CHARACTER GetUserRestrictedDefaultLevel (character, character, character) Returns the level on which a security item is restricted for a given user
+ CHARACTER GetUserRestrictedDefaultLevel (character, character, character, character) Returns the level on which a security item is restricted for a given user
+ CHARACTER GetUserRestrictedDefaultLevel (character, character, character, character, character) Returns the level on which a security item is restricted for a given user
+ GetUserRestrictedDefaultLevel (GetUserRestrictedDefaultLevelParameter) Returns the level on which a security item is restricted for a given user
+ LOGICAL IsRestricted (character, character) Performs a security authorization check for the specified function
+ IsRestricted (IsRestrictedParameter) Performs a security authorization check for the specified function
+ IsRestrictedCheck (dataset, IsRestrictedCheckParameter) Invokable method that performs an Authorization check for the given user and method
+ IsRestrictedCheck (character, character, character, character, character, logical) Performs a security authorization check for the specified function
+ IsRestrictedCheck (character, character, character, character, character, logical, logical, character) Performs a security authorization check for the specified function
+ IsRestrictedCheck (character, character, character, character, character, logical, character) Performs a security authorization check for the specified function
# LoginCompanyKeyChangedHandler () Event handler for the LoginCompanyKeyChanged event of the SessionManager class
+ RetrieveAllRestrictedSecurityItems (dataset, SecurityRealmParameter) Returns a dataset with all restricted security item keys of the given security realm
+ RetrieveAllRestrictedSecurityItems (character, table) Returns a temp-table with all restricted security item keys of the given security realm
+ RetrieveAllUnrestrictedSecurityItems (dataset-handle, SecurityRealmParameter) Returns a dataset with all unrestricted security item keys of the given security realm
+ RetrieveAllUnrestrictedSecurityItems (character, table-handle) Populates a temp-table with all unrestricted security item keys of the given security realm
+ RetrieveAllUnrestrictedSecurityItems (character, table) Returns a temp-table with all unrestricted security item keys of the given security realm
+ Consultingwerk.Framework.Collections.CharacterList UnrestrictedSecurityItems (character) Returns a Character List with the Security Item Keys of all unrestricted security items
# UserNameChangedHandler () Event handler for the UserNameChanged event of the SessionManager class
+ CHARACTER VerifySecurityItemGuid (character, character) Verifies if the SecurityItemGuid is a valid security item guid
+ VerifySecurityItemGuid (VerifySecurityItemGuidParameter) Verifies if the SecurityItemGuid is a valid security item guid

Top Constructor Summary
Options Name Purpose
+ SecurityService () Constructor for the SecurityService class


Method Detail
Top

PROTECTED DetermineUserGuid ()

Purpose: Determines the Guid of the current user
Notes: Based on the SessionManager:UserName and SessionManager:LoginCompanyKey

Top

PUBLIC CHARACTER GetGroupRestrictedDefaultLevel (character, character, character)

Purpose: Returns the level on which a security item is restricted for a given
group
Notes: Possible values: RESTRICTED-BY-GROUP, NOTRESTRICTED-BY-GROUP,
RESTRICTED-FOR-ALL, NOTRESTRICTED-FOR-ALL, RESTRICTED-BY-REALM,
NOTRESTRICTED-BY-REALM
Used by the AuthorizationMaintenanceService

Parameters:
pcSecurityRealmGuid CHARACTER
The security realm
pcSecurityItemGuid CHARACTER
The security item
pcGroupGuid CHARACTER
The groups guid
Returns CHARACTER
The level on which a security item is restricted for a given group
Top

PUBLIC CHARACTER GetGroupRestrictedDefaultLevel (character, character, character, character)

Purpose: Returns the level on which a security item is restricted for a given
group
Notes: Possible values: RESTRICTED-BY-GROUP, NOTRESTRICTED-BY-GROUP,
RESTRICTED-FOR-ALL, NOTRESTRICTED-FOR-ALL, RESTRICTED-BY-REALM,
NOTRESTRICTED-BY-REALM
Used by the AuthorizationMaintenanceService

Parameters:
pcSecurityRealmGuid CHARACTER
The security realm
pcSecurityItemGuid CHARACTER
The security item
pcGroupGuid CHARACTER
The group guid
pcGroupGuids CHARACTER
The comma delimited list of group guids that this group is member of
Returns CHARACTER
The level on which a security item is restricted for a given group
Top

PUBLIC CHARACTER GetGroupRestrictedDefaultLevel (character, character, character, character, character)

Purpose: Returns the level on which a security item is restricted for a given
group
Notes: Possible values: RESTRICTED-BY-GROUP, NOTRESTRICTED-BY-GROUP,
RESTRICTED-FOR-ALL, NOTRESTRICTED-FOR-ALL, RESTRICTED-BY-REALM,
NOTRESTRICTED-BY-REALM
Used by the AuthorizationMaintenanceService

Parameters:
pcSecurityRealmGuid CHARACTER
The security realm
pcSecurityItemGuid CHARACTER
The security item
pcGroupGuid CHARACTER
The group guid
pcGroupGuids CHARACTER
The comma delimited list of group guids that this group is member of
pcLoginCompanyKey CHARACTER
And alternative Login Company Key, when requesting for a different company
Returns CHARACTER
The level on which a security item is restricted for a given group
Top

PUBLIC GetGroupRestrictedDefaultLevel (GetGroupRestrictedDefaultLevelParameter)

Purpose: Returns the level on which a security item is restricted for a given
group
Notes: Possible values: RESTRICTED-BY-GROUP, NOTRESTRICTED-BY-GROUP,
RESTRICTED-FOR-ALL, NOTRESTRICTED-FOR-ALL, RESTRICTED-BY-REALM,
NOTRESTRICTED-BY-REALM
Used by the SecurityServiceClient

Parameters:
poParameter Consultingwerk.SmartFramework.Authorization.GetGroupRestrictedDefaultLevelParameter
The GetGroupRestrictedDefaultLevelParameter instance with the data for this call
Top

PUBLIC CHARACTER GetUserRestrictedDefaultLevel (character, character, character)

Purpose: Returns the level on which a security item is restricted for a given
user
Notes: Possible values: RESTRICTED-BY-GROUP, NOTRESTRICTED-BY-GROUP,
RESTRICTED-FOR-ALL, NOTRESTRICTED-FOR-ALL, RESTRICTED-BY-REALM,
NOTRESTRICTED-BY-REALM
Used by the AuthorizationMaintenanceService

Parameters:
pcSecurityRealmGuid CHARACTER
The security realm
pcSecurityItemGuid CHARACTER
The security item
pcUserGuid CHARACTER
The users security groups
Returns CHARACTER
The level on which a security item is restricted for a given user
Top

PUBLIC CHARACTER GetUserRestrictedDefaultLevel (character, character, character, character)

Purpose: Returns the level on which a security item is restricted for a given
user
Notes: Possible values: RESTRICTED-BY-GROUP, NOTRESTRICTED-BY-GROUP,
RESTRICTED-FOR-ALL, NOTRESTRICTED-FOR-ALL, RESTRICTED-BY-REALM,
NOTRESTRICTED-BY-REALM
Used by the AuthorizationMaintenanceService

Parameters:
pcSecurityRealmGuid CHARACTER
The security realm
pcSecurityItemGuid CHARACTER
The security item
pcUserGuid CHARACTER
The user guid
pcGroupGuids CHARACTER
The comma delimited list of groups (and parent groups) the user belongs to
Returns CHARACTER
The level on which a security item is restricted for a given user
Top

PUBLIC CHARACTER GetUserRestrictedDefaultLevel (character, character, character, character, character)

Purpose: Returns the level on which a security item is restricted for a given
user
Notes: Possible values: RESTRICTED-BY-GROUP, NOTRESTRICTED-BY-GROUP,
RESTRICTED-FOR-ALL, NOTRESTRICTED-FOR-ALL, RESTRICTED-BY-REALM,
NOTRESTRICTED-BY-REALM
Used by the AuthorizationMaintenanceService

Parameters:
pcSecurityRealmGuid CHARACTER
The security realm
pcSecurityItemGuid CHARACTER
The security item
pcUserGuid CHARACTER
The user guid
pcGroupGuids CHARACTER
The comma delimited list of groups (and parent groups) the user belongs to
pcLoginCompanyKey CHARACTER
And alternative Login Company Key, when requesting for a different company
Returns CHARACTER
The level on which a security item is restricted for a given user
Top

PUBLIC GetUserRestrictedDefaultLevel (GetUserRestrictedDefaultLevelParameter)

Purpose: Returns the level on which a security item is restricted for a given
user
Notes: Possible values: RESTRICTED-BY-GROUP, NOTRESTRICTED-BY-GROUP,
RESTRICTED-FOR-ALL, NOTRESTRICTED-FOR-ALL, RESTRICTED-BY-REALM,
NOTRESTRICTED-BY-REALM
Used by the SecurityServiceClient

Parameters:
poParameter Consultingwerk.SmartFramework.Authorization.GetUserRestrictedDefaultLevelParameter
The GetUserRestrictedDefaultLevelParameter instance with the data for this call
Top

PUBLIC LOGICAL IsRestricted (character, character)

Purpose: Performs a security authorization check for the specified function
Notes: Directly accesses the SmartSecurityAssignment database table for
Performance reasons and because a caching other than what the DB
does anyway is not useful for the security settings

Parameters:
pcRealmCode CHARACTER
The code of the security realm to verify
pcSecurityItemGuid CHARACTER
The guid of the security item to verify
Returns LOGICAL
Logical value indicating if the specified function is restricted for the current user
Top

PUBLIC IsRestricted (IsRestrictedParameter)

Purpose: Performs a security authorization check for the specified function
Notes: Client callable wrapper to the IsRestricted method of the ISecurityService
interface
Used by the SecurityServiceClient

Parameters:
poParameter Consultingwerk.SmartFramework.Authorization.IsRestrictedParameter
The IsRestrictedParameter instance with the data for this call
Top

PUBLIC IsRestrictedCheck (dataset, IsRestrictedCheckParameter)

Purpose: Invokable method that performs an Authorization check for the given
user and method
Notes: Optionally returns the Dataset with the user groups the user is member of

Parameters:
dsUserGroups DATASET dsUserGroups
INPUT-OUTPUT Dataset to return the user group information to the client
poParameter Consultingwerk.SmartFramework.Authorization.IsRestrictedCheckParameter
The IsRestrictedCheckParameter instance with the parameters for this call
Top

PUBLIC IsRestrictedCheck (character, character, character, character, character, logical)

Purpose: Performs a security authorization check for the specified function
Notes: Directly accesses the SmartSecurityAssignment database table for
Performance reasons and because a caching other than what the DB
does anyway is not useful for the security settings

Parameters:
pcRealmCode CHARACTER
The code of the security realm to verify
pcSecurityItemGuid CHARACTER
The guid of the security item to verify
pcUserGuid CHARACTER
The Guid of the user to check
pcCurrentLoginCompanyGuid CHARACTER
The Guid of the login company to check
pcUserGroupGuids CHARACTER
The comma delimited list of user group guids the user belongs to
plRestricted LOGICAL
OUTPUT Returns if the user is not allowed to perform the action in question
Top

PUBLIC IsRestrictedCheck (character, character, character, character, character, logical, logical, character)

Purpose: Performs a security authorization check for the specified function
Notes: Directly accesses the SmartSecurityAssignment database table for
Performance reasons and because a caching other than what the DB
does anyway is not useful for the security settings

Parameters:
pcRealmCode CHARACTER
The code of the security realm to verify
pcSecurityItemGuid CHARACTER
The guid of the security item to verify
pcUserGuid CHARACTER
The Guid of the user to check
pcCurrentLoginCompanyGuid CHARACTER
The Guid of the login company to check
pcUserGroupGuids CHARACTER
The comma delimited list of user group guids the user belongs to
plRestricted LOGICAL
OUTPUT Returns if the user is not allowed to perform the action in question
plIncludeReason LOGICAL
Logical flag indicating if the pcReason should be populated
pcReason CHARACTER
OUTPUT Returns the reason based on which setting the user is receiving the restriction or not
Top

PUBLIC IsRestrictedCheck (character, character, character, character, character, logical, character)

Purpose: Performs a security authorization check for the specified function
Notes: Directly accesses the SmartSecurityAssignment database table for
Performance reasons and because a caching other than what the DB
does anyway is not useful for the security settings

Parameters:
pcRealmCode CHARACTER
The code of the security realm to verify
pcSecurityItemGuid CHARACTER
The guid of the security item to verify
pcUserGuid CHARACTER
The Guid of the user to check
pcCurrentLoginCompanyGuid CHARACTER
The Guid of the login company to check
pcUserGroupGuids CHARACTER
The comma delimited list of user group guids the user belongs to
plRestricted LOGICAL
OUTPUT Returns if the user is not allowed to perform the action in question
pcReason CHARACTER
OUTPUT Returns the reason based on which setting the user is receiving the restriction or not
Top

PROTECTED LoginCompanyKeyChangedHandler ()

Purpose: Event handler for the LoginCompanyKeyChanged event of the SessionManager class
Notes:

Top

PUBLIC RetrieveAllRestrictedSecurityItems (dataset, SecurityRealmParameter)

Purpose: Returns a dataset with all restricted security item keys
of the given security realm
Notes: Client callable wrapper to the RetrieveAllRestrictedSecurityItems method of the
ISecurityService interface

Parameters:
dsSecurityItemKeys DATASET dsSecurityItemKeys
The dataset with the resulting security item keys, from Consultingwerk/SmartFramework/Authorization/ttSecurityItemKeys.i
poRealmParameter Consultingwerk.SmartFramework.Authorization.SecurityRealmParameter
The holder object with the code of the security realm to verify
Top

PUBLIC RetrieveAllRestrictedSecurityItems (character, table)

Purpose: Returns a temp-table with all restricted security item keys
of the given security realm
Notes: Is expected to leverage the lookup definition form the realm
service to determine the list of available security items

Parameters:
pcRealmCode CHARACTER
The code of the security realm to verify
ttSecurityItemKeys TEMP-TABLE ttSecurityItemKeys
The temp-table with the resulting security item keys, from Consultingwerk/SmartFramework/Authorization/ttSecurityItemKeys.i
Top

PUBLIC RetrieveAllUnrestrictedSecurityItems (dataset-handle, SecurityRealmParameter)

Purpose: Returns a dataset with all unrestricted security item keys
of the given security realm
Notes: Client callable wrapper to the RetrieveAllUnrestrictedSecurityItems method of the
ISecurityService interface

Parameters:
hDataset DATASET-HANDLE
The dataset with the resulting security item keys, from Consultingwerk/SmartFramework/Authorization/ttSecurityItemKeys.i
poRealmParameter Consultingwerk.SmartFramework.Authorization.SecurityRealmParameter
The holder object with the code of the security realm to verify
Top

PUBLIC RetrieveAllUnrestrictedSecurityItems (character, table-handle)

Purpose: Populates a temp-table with all unrestricted security item keys
of the given security realm
Notes: Is expected to leverage the lookup definition form the realm
service to determine the list of available security items
This method populates the first field (data type should be CHARACTER)
of the provided method. This method may be used as an input to the
BusinessEntity/DataAccess FetchDataByKeyTable method

Parameters:
pcRealmCode CHARACTER
The code of the security realm to verify
hSecurityItemKeys TABLE-HANDLE
INPUT-OUTPUT The dynamic temp-table with the resulting security item keys
Top

PUBLIC RetrieveAllUnrestrictedSecurityItems (character, table)

Purpose: Returns a temp-table with all unrestricted security item keys
of the given security realm
Notes: Is expected to leverage the lookup definition form the realm
service to determine the list of available security items

Parameters:
pcRealmCode CHARACTER
The code of the security realm to verify
ttSecurityItemKeys TEMP-TABLE ttSecurityItemKeys
The temp-table with the resulting security item keys, from Consultingwerk/SmartFramework/Authorization/ttSecurityItemKeys.i
Top

PUBLIC Consultingwerk.Framework.Collections.CharacterList UnrestrictedSecurityItems (character)

Purpose: Returns a Character List with the Security Item Keys of all
unrestricted security items
Notes:

Parameters:
pcRealmCode CHARACTER
The security realm
Returns Consultingwerk.Framework.Collections.CharacterList
The CharacterList instance with all unrestricted security item keys
Top

PROTECTED UserNameChangedHandler ()

Purpose: Event handler for the UserNameChanged event of the SessionManager class
Notes:

Top

PUBLIC CHARACTER VerifySecurityItemGuid (character, character)

Purpose: Verifies if the SecurityItemGuid is a valid security item guid
Notes: If the code of the security item is provided (Lookup's KeyField value),
the GUID is returned

Parameters:
pcRealmCode CHARACTER
The code of the security realm
pcSecurityItemGuid CHARACTER
The GUID or Code of the Security Item
Returns CHARACTER
THe GUID of the Security Item
Top

PUBLIC VerifySecurityItemGuid (VerifySecurityItemGuidParameter)

Purpose: Verifies if the SecurityItemGuid is a valid security item guid
Notes: If the code of the security item is provided (Lookup's KeyField value),
the GUID is returned

Parameters:
poParameter Consultingwerk.SmartFramework.Authorization.VerifySecurityItemGuidParameter
The VerifySecurityItemGuidParameter instance with the data for this call


Constructor Detail
Top

PUBLIC SecurityService ()

Purpose: Constructor for the SecurityService class
Notes:



ProDataset Detail

ProDataset dsSecurityItemKeys

Member tables: ttSecurityItemKeys

ProDataset dsUserGroups

Member tables: ttUserGroups


Temp-Table Detail

Temp-Table ttSecurityItemKeys

Defined in:

Temp-Table ttUserGroups

Defined in:


©2006-2020 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       04.02.2020 23:19:14