Exemple #1
0
        /// <summary>
        /// Loads the user permissions.
        /// </summary>
        private void loadPermissions()
        {
            this.projectOverviewButtonCreateProject.Visible = ARA_ACL.getPermissionLevel("General.ButtonCreateProject") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.projectOverviewButtonSpacer3.Visible       = ARA_ACL.getPermissionLevel("General.ButtonCreateProject") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.projectOverviewPanelCreateProject.Enabled  = ARA_ACL.getPermissionLevel("General.ButtonCreateProject") == ARA_Globals.PermissionLevel.All;

            this.projectOverviewButtonOpenProject.Visible = ARA_ACL.getPermissionLevel("General.ButtonOpenProject") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.projectOverviewButtonSpacer2.Visible     = ARA_ACL.getPermissionLevel("General.ButtonOpenProject") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.projectOverviewPanelOpenProject.Enabled  = ARA_ACL.getPermissionLevel("General.ButtonOpenProject") == ARA_Globals.PermissionLevel.All;

            this.projectOverviewButtonRecentProjects.Visible = ARA_ACL.getPermissionLevel("General.ButtonRecentProjects") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.ProjectOverviewButtonSpacer1.Visible        = ARA_ACL.getPermissionLevel("General.ButtonRecentProjects") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.ProjectOverviewPanelRecentProjects.Enabled  = ARA_ACL.getPermissionLevel("General.ButtonRecentProjects") == ARA_Globals.PermissionLevel.All;

            this.projectOverviewButtonCreateProjectRevision.Visible = ARA_ACL.getPermissionLevel("General.ButtonCreateProjectRevision") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.panel1.Visible = ARA_ACL.getPermissionLevel("General.ButtonCreateProjectRevision") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.projectOverviewPanelCreateProjectRevision.Enabled = ARA_ACL.getPermissionLevel("General.ButtonCreateProjectRevision") == ARA_Globals.PermissionLevel.All;

            this.projectOverviewButtonEditRiskStandard.Visible = ARA_ACL.getPermissionLevel("General.ButtonEditStandardRisks") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.panel2.Visible = ARA_ACL.getPermissionLevel("General.ButtonEditStandardRisks") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.projectOverviewPanelEditRiskStandard.Enabled = ARA_ACL.getPermissionLevel("General.ButtonEditStandardRisks") == ARA_Globals.PermissionLevel.All;

            this.projectOverviewButtonCreateNewRisk.Visible = ARA_ACL.getPermissionLevel("General.ButtonCreateNewRisk") == ARA_Globals.PermissionLevel.All;
            this.panel3.Visible = ARA_ACL.getPermissionLevel("General.ButtonCreateNewRisk") == ARA_Globals.PermissionLevel.All;
            this.projectOverviewButtonCreateNewRisk.Enabled = ARA_ACL.getPermissionLevel("General.ButtonCreateNewRisk") == ARA_Globals.PermissionLevel.All;
        }
Exemple #2
0
        /// <summary>
        /// Loads the users permissions to see and use form elements.
        /// </summary>
        private void loadPermissions()
        {
            this.riskProjectOverviewButtonAddRiskToProject.Visible = ARA_ACL.getPermissionLevel("General.ButtonAddRiskToProject") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.riskProjectOverviewPanelAddRiskToProject.Visible  = ARA_ACL.getPermissionLevel("General.ButtonAddRiskToProject") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.riskProjectOverviewPanelAddRiskToProject.Enabled  = ARA_ACL.getPermissionLevel("General.ButtonAddRiskToProject") == ARA_Globals.PermissionLevel.All;

            this.riskProjectOverviewButtonEditProjectDetails.Visible = ARA_ACL.getPermissionLevel("General.ButtonEditProjectDetails") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.riskProjectOverviewPanelEditProjectDetails.Visible  = ARA_ACL.getPermissionLevel("General.ButtonEditProjectDetails") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.riskProjectOverviewPanelEditProjectDetails.Enabled  = ARA_ACL.getPermissionLevel("General.ButtonEditProjectDetails") == ARA_Globals.PermissionLevel.All;

            this.riskProjectOverviewButtonOpenRisk.Visible = ARA_ACL.getPermissionLevel("General.ButtonOpenRisk") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.riskProjectOverviewPanelOpenRisk.Visible  = ARA_ACL.getPermissionLevel("General.ButtonOpenRisk") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.riskProjectOverviewPanelOpenRisk.Enabled  = ARA_ACL.getPermissionLevel("General.ButtonOpenRisk") == ARA_Globals.PermissionLevel.All;

            this.riskProjectOverviewButtonCopyRisk.Visible = ARA_ACL.getPermissionLevel("General.ButtonCopyRisksToProject") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.riskProjectOverviewPanelCopyRisk.Visible  = ARA_ACL.getPermissionLevel("General.ButtonCopyRisksToProject") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.riskProjectOverviewPanelCopyRisk.Enabled  = ARA_ACL.getPermissionLevel("General.ButtonCopyRisksToProject") == ARA_Globals.PermissionLevel.All;

            this.riskProjectOverviewButtonGenerateReports.Visible = ARA_ACL.getPermissionLevel("General.ButtonGenerateReports") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.riskProjectOverviewPanelGenerateReports.Visible  = ARA_ACL.getPermissionLevel("General.ButtonGenerateReports") >= ARA_Globals.PermissionLevel.ReadOnly;
            this.riskProjectOverviewPanelGenerateReports.Enabled  = ARA_ACL.getPermissionLevel("General.ButtonGenerateReports") == ARA_Globals.PermissionLevel.All;

            this.riskProjectOverviewButtonMarkClose.Visible      = this.riskProjectOverviewButtonMarkClose.Visible && ARA_ACL.getPermissionLevel("General.ButtonMarkProjectClosed") == ARA_Globals.PermissionLevel.All;
            this.riskProjectOverviewButtonMarkReview.Visible     = this.riskProjectOverviewButtonMarkReview.Visible && ARA_ACL.getPermissionLevel("General.ButtonMarkProjectForReview") == ARA_Globals.PermissionLevel.All;
            this.riskProjectOverviewButtonMarkDoneReview.Visible = this.riskProjectOverviewButtonMarkDoneReview.Visible && ARA_ACL.getPermissionLevel("General.ButtonMarkProjectDoneReviewing") == ARA_Globals.PermissionLevel.All;
        }
 /// <summary>
 /// Loads the users permissions.
 /// </summary>
 private void loadPermissions()
 {
     this.arA_EditRiskExposedPersons1.Enabled         = ARA_ACL.getPermissionLevel("Function.EditExposedPersons") == ARA_Globals.PermissionLevel.All;
     this.arA_EditRiskHazardIndentification1.Enabled  = ARA_ACL.getPermissionLevel("Function.EditHazardIndentification") == ARA_Globals.PermissionLevel.All;
     this.arA_EditRiskRiskEstimation1.Enabled         = ARA_ACL.getPermissionLevel("Function.EditRiskEstimationBeforeRiskReduction") == ARA_Globals.PermissionLevel.All;
     this.arA_EditRiskRiskEstimation2.Enabled         = ARA_ACL.getPermissionLevel("Function.EditRiskEstimationAfterRiskReduction") == ARA_Globals.PermissionLevel.All;
     this.arA_EditRiskRiskReductionMesures1.Enabled   = ARA_ACL.getPermissionLevel("Function.EditRiskReductionMesures") == ARA_Globals.PermissionLevel.All;
     this.arA_EditRiskRiskReductionMesures2.Enabled   = ARA_ACL.getPermissionLevel("Function.EditRemaingRisk") == ARA_Globals.PermissionLevel.All;
     this.arA_ButtonEditRiskImage.Enabled             = ARA_ACL.getPermissionLevel("Function.EditRiskImage") == ARA_Globals.PermissionLevel.All;
     this.editRiskBaseFormButtonReviewAccept.Enabled  = ARA_ACL.getPermissionLevel("Function.ReviewRisks") == ARA_Globals.PermissionLevel.All;
     this.editRiskBaseFormButtonReviewDecline.Enabled = ARA_ACL.getPermissionLevel("Function.ReviewRisks") == ARA_Globals.PermissionLevel.All;
 }
Exemple #4
0
 /// <summary>
 /// Function to check if the ACL can be loaded.
 /// </summary>
 /// <returns></returns>
 private bool canACLBeLoaded()
 {
     try
     {
         ARA_ACL temp = ARA_ACL.Instance;
         ARA_ACL.Instance.loadPermissionsFromXML();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
 public void loadPermissions()
 {
     this.mainMenuButtonOpenAdminPanel.Visible = ARA_ACL.getPermissionLevel("General.ButtonOpenAdminPanel") == ARA_Globals.PermissionLevel.All;
 }