Introduction

Module Zero implements fundamental concepts of ASP.NET Boilerplate framework such as tenant management (multi-tenancy), role management, user management, session, authorization (permission system), setting management and audit logging.

Microsoft ASP.NET Identity Framework

Module Zero is based on Microsoft's ASP.NET Identity Framework. It extends user and role managers and implements user and role stores using generic repositories. It supports any ORM that can be used with ASP.NET Boilerplate (like Entity Framework and NHibernate).

While module zero extends Identity Framework, it has many unique features as described below.

Permissions

In ASP.NET Boilerplate system, users are authorized by permissions. A permission is a specific privilege for a certain functionality of the application. It can be "entering a specific page", or "performing some specific action in a page" or a more general access right (like downloading excel files in the application). See authorization documentation for more information.

Session

Module zero implements IAbpSession. You can inject it anywhere to get current user and tenant ids.

Role Management

Roles are used to group permissions. When a user has a role, then he/she will have all permissions of that role. In module-zero, roles can be dynamic or static:

Default role(s)

One or more roles can be set as default. Default roles are assigned to new added/registered users as default. This is not a development time property and can be set or changed after deployment.

User Management

Users are people who can login to the application and perform some operations based on their permissions.

A user can have zero or more roles. A user inherits union of permissions of his all roles. Also, we can set user-specific permission. A user specific permission setting overrides role settings for this permission.

Multi Tenancy

Wikipedia: Multitenancy refers to a software architecture in which a single instance of a software runs on a server and serves multiple tenants (customers).

ASP.NET Boilerplate supports, module-zero implements multi-tenancy. Thus, we can have an application deployed into single environment and used by multiple customers (tenants) simultaneously.

A tenant can have it's own roles, users and settings. It's not limited to roles, users and settings. We can implement IMustHaveTenant and IMayHaveTenant for entities which should be tenant-specific. ASP.NET Boilerplate automatically hides (filters) other tenant entities when logged in with a tenant's user. See data filters documentation.

Setting Management

Module zero implements setting store of ASP.NET Boilerplate to store/retrieve settings to/from database. See setting documentation for more information.

Audit Logging

Module zero implements ASP.NET Boilerplate's audit logging system. Thus, automatically logs all user actions to the database.