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, TDataBase ADataBase=null) |
Tests whether the current user has access to a particular Partner. More... | |
static void | CanAccessPartnerExc (PPartnerRow APartnerRow, TDataBase ADataBase=null) |
Tests whether the current user has access to a particular Partner. More... | |
static TPartnerAccessLevelEnum | CanAccessPartnerByKey (Int64 APartnerKey, bool AThrowExceptionIfDenied, TDataBase ADataBase=null) |
Tests whether the current user has access to a particular Partner. More... | |
Contains security-related functions for Partners that that can be used by any Class.
Note: There are other security-related Methods to be found in Shared. Class: Ict.Petra.Shared.MParter, Security.cs, Class TSecurity.
|
inlinestatic |
Tests whether the current user has access to a particular Partner.
Corresponds to Progress 4GL Method 'CanAccessPartner' in common/sp_partn.p
A shared implementation of this Method exists that has two additional Arguments. It needs the Foundation Row to be passed in, but has the advantage of not needing a Server roundtrip for a DB lookup!
APartnerRow | Partner for which access should be checked for. |
ADataBase | An instantiated TDataBase object, or null (default = null). If null gets passed then the Method executes DB commands with a new Database connection |
|
inlinestatic |
Tests whether the current user has access to a particular Partner.
Corresponds to Progress 4GL Method 'CanAccessPartner' in common/sp_partn.p
APartnerKey | PartnerKey of Partner for which access should be checked for. |
AThrowExceptionIfDenied | |
ADataBase | An instantiated TDataBase object, or null (default = null). If null gets passed then the Method executes DB commands with a new Database connection |
|
inlinestatic |
Tests whether the current user has access to a particular Partner.
This Method throws an T: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. |
ADataBase | An instantiated TDataBase object, or null (default = null). If null gets passed then the Method executes DB commands with a new Database connection |
T:ESecurityPartnerAccessDeniedException | Thrown if access is not granted. |