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, 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, SecurityRealmParameter) Returns a dataset 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
# UserNameChangedHandler () Event handler for the UserNameChanged event of the SessionManager class

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
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

PROTECTED 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
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 TABLE
The temp-table with the resulting security item keys, from Consultingwerk/SmartFramework/Authorization/ttSecurityItemKeys.i
Top

PUBLIC RetrieveAllUnrestrictedSecurityItems (dataset, 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:
dsSecurityItemKeys DATASET
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)

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 TABLE
The temp-table with the resulting security item keys, from Consultingwerk/SmartFramework/Authorization/ttSecurityItemKeys.i
Top

PROTECTED UserNameChangedHandler ()

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



Constructor Detail
Top

PUBLIC SecurityService ()

Purpose: Constructor for the SecurityService class
Notes:



©2006-2016 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       26.08.2016 08:35:24