OpenPetra
Free Administration Software for Non-Profits
|
Contains security-related functions for Partners that that can be used by any Class. More...
Static Public Member Functions | |
static TPartnerAccessLevelEnum | CanAccessPartner (PPartnerRow APartnerRow, bool AIsFoundation, PFoundationRow AFoundationRow) |
Tests whether the current user has access to a particular Partner. More... | |
static void | CanAccessPartnerExc (PPartnerRow APartnerRow, bool AIsFoundation, PFoundationRow AFoundationRow) |
Tests whether the current user has access to a particular Partner. More... | |
static void | AccessLevelExceptionEvaluatorAndThrower (PPartnerRow APartnerRow, TPartnerAccessLevelEnum AAccessLevel) |
Evaluates the passed in AccessLevel and throws ESecurityPartnerAccessDeniedException if the AccessLevel isn't TPartnerAccessLevelEnum.palGranted. More... | |
static bool | CheckFoundationSecurity (PFoundationRow AFoundationRow) |
Tests whether the current user has access to a particular Foundation. More... | |
static bool | CheckFoundationSecurity (Int64 AFoundationOwner1Key, Int64 AFoundationOwner2Key) |
Tests whether the current user has access to a particular Foundation. More... | |
Static Public Attributes | |
const byte | PARTNER_RESTRICTED_TO_GROUP = 1 |
Partner is restricted to a Security Group More... | |
const byte | PARTNER_RESTRICTED_TO_USER = 2 |
Partner is restricted to a User More... | |
Contains security-related functions for Partners that that can be used by any Class.
There are other security-related Methods to be found on the server side. Class: Ict.Petra.Server.MParter, Security.cs, Class TSecurity.
|
inlinestatic |
Evaluates the passed in AccessLevel and throws ESecurityPartnerAccessDeniedException if the AccessLevel isn't TPartnerAccessLevelEnum.palGranted.
APartnerRow | Partner for which access should be checked for. |
AAccessLevel | AccessLevel as determined by caller. |
|
inlinestatic |
Tests whether the current user has access to a particular Partner.
Corresponds to Progress 4GL Method 'CanAccessPartner' in common/sp_partn.p
A server-side implementation of this Method exists that has only the APartnerRow parameter as an Argument. It looks up the Foundation Row on its own if this is needed.
APartnerRow | Partner for which access should be checked for. |
AIsFoundation | Set to true if Partner is a Foundation. |
AFoundationRow | Foundation Row needs to be passed in if Partner is a Foundation. |
|
inlinestatic |
Tests whether the current user has access to a particular Partner.
This Method throws an ESecurityPartnerAccessDeniedException if access to the Partner is not granted, thereby ensuring that a denied access doesn't go unnoticed.
APartnerRow | Partner for which access should be checked for. |
AIsFoundation | Set to true if Partner is a Foundation. |
AFoundationRow | Foundation Row needs to be passed in if Partner is a Foundation. |
ESecurityPartnerAccessDeniedException | Thrown if access is not granted. |
|
inlinestatic |
Tests whether the current user has access to a particular Foundation.
Corresponds to Progress 4GL Method 'CheckFoundationSecurity' in common/sp_partn.p
AFoundationOwner1Key | PartnerKey of the first owner of the Foundation. Pass in 0 if there is no first owner. |
AFoundationOwner2Key | PartnerKey of the second owner of the Foundation Pass in 0 if there is no second owner. |
|
inlinestatic |
Tests whether the current user has access to a particular Foundation.
Corresponds to Progress 4GL Method 'CheckFoundationSecurity' in common/sp_partn.p
AFoundationRow | Foundation row to check for. |
|
static |
|
static |
Partner is restricted to a User