/// <summary>
        /// Override this method to perform custom initialization of the action model,
        /// such as adding permissions or adding custom actions.
        /// </summary>
        /// <param name="model"></param>
        protected override void InitializeActionModel(AdminActionModel model)
        {
            base.InitializeActionModel(model);

            _resetPasswordAction = model.AddAction("resetPassword", SR.TitleResetPassword, "Icons.ResetToolSmall.png",
                                                   SR.TitleResetPassword, ResetUserPassword, ClearCanvas.Enterprise.Common.AuthorityTokens.Admin.Security.User);

            _viewSessionsAction = model.AddAction("viewSessions", "View Sessions", "Icons.ViewUserSessionsSmall.png",
                                                  SR.TitleViewUserSessions, ViewUserSessions, ClearCanvas.Enterprise.Common.AuthorityTokens.Admin.Security.User);

            model.Add.SetPermissibility(ClearCanvas.Enterprise.Common.AuthorityTokens.Admin.Security.User);
            model.Edit.SetPermissibility(ClearCanvas.Enterprise.Common.AuthorityTokens.Admin.Security.User);
            model.Delete.SetPermissibility(ClearCanvas.Enterprise.Common.AuthorityTokens.Admin.Security.User);
        }
Example #2
0
        /// <summary>
        /// Override this method to perform custom initialization of the action model,
        /// such as adding permissions or adding custom actions.
        /// </summary>
        /// <param name="model"></param>
        protected override void InitializeActionModel(AdminActionModel model)
        {
            base.InitializeActionModel(model);

            model.AddAction("duplicate", SR.TitleDuplicate, "Icons.DuplicateSmall.png", SR.TooltipDuplicateAuthorityGroup,
                            DuplicateSelectedItem,
                            AuthorityTokens.Admin.Security.AuthorityGroup);

            model.AddAction("import", SR.TitleImport, "Icons.ImportAuthorityTokensSmall.png", SR.TooltipImportAuthorityGroup,
                            Import,
                            AuthorityTokens.Admin.Security.AuthorityGroup);


            model.Add.SetPermissibility(AuthorityTokens.Admin.Security.AuthorityGroup);
            model.Edit.SetPermissibility(AuthorityTokens.Admin.Security.AuthorityGroup);
            model.Delete.SetPermissibility(AuthorityTokens.Admin.Security.AuthorityGroup);
        }
Example #3
0
        /// <summary>
        /// Override this method to perform custom initialization of the action model,
        /// such as adding permissions or adding custom actions.
        /// </summary>
        /// <param name="model"></param>
        protected override void InitializeActionModel(AdminActionModel model)
        {
            base.InitializeActionModel(model);

            _duplicateCannedTextAction = model.AddAction("duplicateCannedText", SR.TitleDuplicate, "Icons.DuplicateSmall.png",
                                                         SR.TitleDuplicate, DuplicateAdd);

            _copyCannedTextToClipboardAction = model.AddAction("copyCannedText", SR.TitleCopy, "Icons.CopyToClipboardToolSmall.png",
                                                               SR.MessageCopyToClipboard, CopyCannedText);

            _editCannedTextCategoryAction = model.AddAction("editCategory", SR.TitleChangeCategory, "Icons.MultiEditToolSmall.png",
                                                            SR.MessageChangeCategoryToolTip, EditCategories);

            _duplicateCannedTextAction.Enabled       = false;
            _copyCannedTextToClipboardAction.Enabled = false;
            _editCannedTextCategoryAction.Enabled    = false;
        }
Example #4
0
        /// <summary>
        /// Override this method to perform custom initialization of the action model,
        /// such as adding permissions or adding custom actions.
        /// </summary>
        /// <param name="model"></param>
        protected override void InitializeActionModel(AdminActionModel model)
        {
            base.InitializeActionModel(model);

            model.Add.SetPermissibility(
                OrPermissions(
                    Application.Common.AuthorityTokens.Admin.Data.ExternalPractitioner,
                    Application.Common.AuthorityTokens.Workflow.ExternalPractitioner.Create));
            model.Edit.SetPermissibility(
                OrPermissions(
                    Application.Common.AuthorityTokens.Admin.Data.ExternalPractitioner,
                    Application.Common.AuthorityTokens.Workflow.ExternalPractitioner.Update));

            // these actions are only available to admins
            model.Delete.SetPermissibility(Application.Common.AuthorityTokens.Admin.Data.ExternalPractitioner);
            model.ToggleActivation.SetPermissibility(Application.Common.AuthorityTokens.Admin.Data.ExternalPractitioner);

            _mergePractitionerAction = model.AddAction("mergePractitioner", SR.TitleMergePractitioner, "Icons.MergePersonToolMedium.png",
                                                       SR.TitleMergePractitioner, MergePractitioners);
            _mergePractitionerAction.Enabled = false;
            _mergePractitionerAction.SetPermissibility(
                OrPermissions(
                    Application.Common.AuthorityTokens.Admin.Data.ExternalPractitioner,
                    Application.Common.AuthorityTokens.Workflow.ExternalPractitioner.Merge));

            _mergeContactPointAction = model.AddAction("mergeContactPoint", SR.TitleMergeContactPoints, "Icons.MergeContactPointToolMedium.png",
                                                       SR.TitleMergeContactPoints, MergeContactPoint);
            _mergeContactPointAction.Enabled = false;
            _mergeContactPointAction.SetPermissibility(
                OrPermissions(
                    Application.Common.AuthorityTokens.Admin.Data.ExternalPractitioner,
                    Application.Common.AuthorityTokens.Workflow.ExternalPractitioner.Merge));

            // #10231: hide these tools for the time being, since the functionality is not well tested
            _mergePractitionerAction.Visible = false;
            _mergeContactPointAction.Visible = false;
        }