Namespace: Consultingwerk.SmartFramework.Authorization
Class 
SecurityServiceClient Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object
Implements: Consultingwerk.SmartFramework.Authorization.ISecurityService

File:SecurityServiceClient
Purpose:ISecurityService implementation for the AppServer
client
Description:Provides chaching for IsRestricted enquiries
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Fri Apr 18 20:57:07 CEST 2014
/* Mike Fechner, Consultingwerk Ltd. 13.09.2017
Preprocessor variables for SmartComponentLibrary, WinKit and SmartFramework
based on Consultingwerk/packages.i now



Top Method Summary
Options Name Purpose
+ ClearCache () Clears the cache of the SecurityServiceClient
+ 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
+ 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
+ LOGICAL IsRestricted (character, character) Performs a security authorization check for the specified function
+ 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
+ RetrieveAllRestrictedSecurityItems (character, table) Returns a temp-table with all restricted 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
+ CHARACTER VerifySecurityItemGuid (character, character) Verifies if the SecurityItemGuid is a valid security item guid

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


Method Detail
Top

PUBLIC ClearCache ()

Purpose: Clears the cache of the SecurityServiceClient
Notes:

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 group 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 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 LOGICAL IsRestricted (character, character)

Purpose: Performs a security authorization check for the specified function
Notes:

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

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

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


Constructor Detail
Top

PUBLIC SecurityServiceClient ()

Purpose: Constructor for the SecurityServiceClient class
Notes:



Temp-Table Detail

Temp-Table ttSecurityItemKeys

Defined in:


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