Exemplo n.º 1
0
        private void btnSaveRole_Click(object sender, EventArgs e)
        {
            if (propRole.SelectedObject != null)
            {
                RbacRoleWeb wRole = propRole.SelectedObject as RbacRoleWeb;
                wRole.MetaDataRbac         = txtRole.Text;
                wRole.MetaDataEntitlements = txtEntitlements.Text;

                try
                {
                    Rbac.Save(wRole);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Exemplo n.º 2
0
        private void cbRoles_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cbRoles.SelectedItem != null)
            {
                RbacRole    dbRole = Rbac.GetRole(((RbacRole)cbRoles.SelectedItem).Name);
                RbacRoleWeb role   = new RbacRoleWeb(dbRole);

                tabPage4.Text        = role.Name;
                txtRole.Text         = role.MetaDataRbac;
                txtEntitlements.Text = role.MetaDataEntitlements;

                role.MetaDataRbac         = string.Empty;
                role.MetaDataEntitlements = string.Empty;
                propRole.SelectedObject   = role;
            }
            else
            {
                tabPage4.Tag  = null;
                tabPage4.Text = "Role";
            }
            ParseInline();
        }
Exemplo n.º 3
0
 public RbacRole Put(int id, [FromBody] RbacRoleWeb role)
 {
     return(Rbac.Save(role));
 }
Exemplo n.º 4
0
 public RbacRole Post([FromBody] RbacRoleWeb role)
 {
     return(Rbac.Save(role));
 }