Exemplo n.º 1
0
        public void CanInitializeWithFriendlyNameAndRuleName()
        {
            Action action = new Action("FriendlyName", "RuleName");

            Assert.AreEqual("FriendlyName", action.FriendlyName);
            Assert.AreEqual("RuleName", action.RuleName);
        }
Exemplo n.º 2
0
        public void CanChangeFriendlyNameAndRuleName()
        {
            Action action = new Action("FriendlyName", "RuleName");
            action.FriendlyName = "OtherFriendlyName";
            action.RuleName = "OtherRuleName";

            Assert.AreEqual("OtherFriendlyName", action.FriendlyName);
            Assert.AreEqual("OtherRuleName", action.RuleName);
        }
 protected void RegisterRequiredPermissions(IPermissionsCatalog permissionsCatalog)
 {
     // Register the roles allowed to use this module
     Action allowAdministerPermissions = new Action("Allow Display of Role Permissions", Permissions.AllowAdministerPermissions);
     List<Action> actions = new List<Action>();
     actions.Add(allowAdministerPermissions);
     ModuleActionSet set = new ModuleActionSet("Admin", actions);
     permissionsCatalog.RegisterPermissionSet(set);
 }
 protected virtual void RegisterRequiredPermissions(IPermissionsCatalog permissionsCatalog)
 {
     Action allowCreateTransfer = new Action("Allow Create Transfers", Permissions.AllowCreateTransfers);
     List<Action> moduleActions = new List<Action>();
     moduleActions.Add(allowCreateTransfer);
     ModuleActionSet set = new ModuleActionSet("Electronic Funds Transfers", moduleActions);
     permissionsCatalog.RegisterPermissionSet(set);
 }