RolesController Class

Namespace:
Weavy.Web.Controllers
Assembly:
Weavy.Web.dll

Controller for managing roles.

[Permission(Permission.ManageUsers)]
public class RolesController : WeavyController
Inheritance:
System.Object → WeavyControllerRolesController
Attributes:
PermissionAttribute

Constructors

RolesController()

Methods

AddMembers(Int32, List>) Add role members.
Delete(Int32) Permanently delete the role.
Edit(Int32) Display form for updating role.
Get(Int32, UserQuery) Display the list of people in a role.
GetByName(String) Display the list of people in a role.
Index(RoleQuery) List roles.
Insert(Role) Insert new role.
New() Display form for creating role.
RemoveMember(Int32, Nullable) Removes a role member.
Restore(Int32) Restores the role e.i. clears the IsTrashed flag.
Trash(Int32) Trashes the role e.i. sets the IsTrashed flag.
Update(Int32, String) Update role.

Extension Methods

IsNullOrDefault(T) Gets a value indicating if the specified value has the default value of the generic type.
Serialize(Object) Serializes an object, or graph of connected objects, to a byte array.
SerializeToJson(Object, Nullable, JsonSerializerSettings) Serializes an object, or graph of connected objects, to a json string.
IsValid(Object) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.