Exemple #1
0
 protected void uxSave_Click(object sender, EventArgs e)
 {
     SaveCurrent();
     foreach (string user in usersActions.Keys)
     {
         foreach (TreeNode n in ActionsTree.Nodes)
         {
             AuthorizationManager.ClearUserActions(user, n.Value);
         }
         foreach (string action in usersActions[user])
         {
             AuthorizationManager.AddActionForUser(user, action);
         }
     }
     foreach (string role in rolesActions.Keys)
     {
         foreach (TreeNode n in ActionsTree.Nodes)
         {
             AuthorizationManager.ClearRoleActions(role, n.Value);
         }
         foreach (string action in rolesActions[role])
         {
             AuthorizationManager.AddActionForRole(role, action);
         }
     }
     Unicorn.Web.WebUtility.ShowMessageBox("کاربر گرامی اطلاعات شما ذخیره شد .", Page);
 }