OpenPetra
Free Administration Software for Non-Profits
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Pages
Ict.Petra.Shared.Security.TSecurityChecks Class Reference

Implements security checks. More...

Static Public Member Functions

static string GetModulePermissionForSavingOfSetupScreenData (string AModule)
 Returns the necessary Module Permission for the saving of data in Setup screens. More...
 
static bool CheckUserModulePermissions (string AModuleExpression, string AModuleAccessExceptionContext="")
 Recursively check the module expression and confirm that the user has the required permissions. This code is used by the server when checking permissions for server methods having the RequiredPermissions attribute, but also by the client if it needs to check permissions on the client-side and display a consistent message box thoughout the application. Note that checking on the client side does not negate any check that the server side makes. Sometimes it is easier to pre-check on the client before starting a new thread and Progress Dialog to make the actual server call. More...
 

Static Public Attributes

const string SECURITYPERMISSION_EDITING_AND_SAVING_OF_SETUP_DATA = "EditingAndSavingOfSetupData"
 Security Permission Check: Editing and Saving of data in 'Setup-screens' More...
 
const string SECURITYPERMISSION_FINANCEREPORTING = "FinanceReporting"
 Security Permission Check: 'Finance Reporting' More...
 
const string SECURITYRESTRICTION_READONLY = "READ-ONLY"
 Security Restriction: Editing and Saving of data disabled. More...
 
const string SECURITYRESTRICTION_FINANCEREPORTINGDENIED = "FINANCE_REPORTING_DENIED"
 Security Restriction: Execution (generating) of a 'Finance Report' (or something opening something like it, e.g. Donor/Recipient History) denied. More...
 

Properties

static List< string > SecurityPermissionsSetupScreensEditingAndSaving [get]
 Standard security permissions: Editing and saving of data in 'Setup' screens. More...
 

Detailed Description

Implements security checks.

Member Function Documentation

◆ CheckUserModulePermissions()

static bool Ict.Petra.Shared.Security.TSecurityChecks.CheckUserModulePermissions ( string  AModuleExpression,
string  AModuleAccessExceptionContext = "" 
)
inlinestatic

Recursively check the module expression and confirm that the user has the required permissions. This code is used by the server when checking permissions for server methods having the RequiredPermissions attribute, but also by the client if it needs to check permissions on the client-side and display a consistent message box thoughout the application. Note that checking on the client side does not negate any check that the server side makes. Sometimes it is easier to pre-check on the client before starting a new thread and Progress Dialog to make the actual server call.

Parameters
AModuleExpressionThis is in uppercase and is for example FINANCE-1 or even OR(FINANCE-3,PTNRADMIN). You can use OR or AND to combine permissions in a comma separated list
AModuleAccessExceptionContextAn optional string that will be displayed in the client exception dialog if an exception is thrown
Returns
True if the user has access permissions. Otherwise the method throws a ESecurityModuleAccessDeniedException exception.

◆ GetModulePermissionForSavingOfSetupScreenData()

static string Ict.Petra.Shared.Security.TSecurityChecks.GetModulePermissionForSavingOfSetupScreenData ( string  AModule)
inlinestatic

Returns the necessary Module Permission for the saving of data in Setup screens.

Parameters
AModuleModule that the Setup screen is in.
Returns
Necessary Module Permission for the saving of data in a Setup screens that is in Module AModule .

Member Data Documentation

◆ SECURITYPERMISSION_EDITING_AND_SAVING_OF_SETUP_DATA

const string Ict.Petra.Shared.Security.TSecurityChecks.SECURITYPERMISSION_EDITING_AND_SAVING_OF_SETUP_DATA = "EditingAndSavingOfSetupData"
static

Security Permission Check: Editing and Saving of data in 'Setup-screens'

◆ SECURITYPERMISSION_FINANCEREPORTING

const string Ict.Petra.Shared.Security.TSecurityChecks.SECURITYPERMISSION_FINANCEREPORTING = "FinanceReporting"
static

Security Permission Check: 'Finance Reporting'

◆ SECURITYRESTRICTION_FINANCEREPORTINGDENIED

const string Ict.Petra.Shared.Security.TSecurityChecks.SECURITYRESTRICTION_FINANCEREPORTINGDENIED = "FINANCE_REPORTING_DENIED"
static

Security Restriction: Execution (generating) of a 'Finance Report' (or something opening something like it, e.g. Donor/Recipient History) denied.

◆ SECURITYRESTRICTION_READONLY

const string Ict.Petra.Shared.Security.TSecurityChecks.SECURITYRESTRICTION_READONLY = "READ-ONLY"
static

Security Restriction: Editing and Saving of data disabled.

Property Documentation

◆ SecurityPermissionsSetupScreensEditingAndSaving

List<string> Ict.Petra.Shared.Security.TSecurityChecks.SecurityPermissionsSetupScreensEditingAndSaving
staticget

Standard security permissions: Editing and saving of data in 'Setup' screens.


The documentation for this class was generated from the following file: