Beispiel #1
0
        public void Define(PermissionDefinitionContext context)
        {
            var productGroup = context.AddGroup(PermissionPermissions.GroupName, _localizer["Permission:PermissionManager"]);

            var productManagement = productGroup.AddPermission(PermissionPermissions.Permissions.Default, _localizer["Permission:PermissionStore.Permissions"]);

            productManagement.AddChild(PermissionPermissions.Permissions.Get, _localizer["Permission:PermissionManager.Permissions.Get"]);
            productManagement.AddChild(PermissionPermissions.Permissions.Edit, _localizer["Permission:PermissionManager.Permissions.Edit"]);
        }
Beispiel #2
0
        public void Define(PermissionDefinitionContext context)
        {
            var productGroup = context.AddGroup(ProductPermissions.GroupName, _localizer["Permission:ProductManager"]);

            var productManagement = productGroup.AddPermission(ProductPermissions.Products.Default, _localizer["Permission:ProductStore.Products"]);

            productManagement.AddChild(ProductPermissions.Products.Create, _localizer["Permission:ProductManager.Products.Creeate"]);
            productManagement.AddChild(ProductPermissions.Products.Edit, _localizer["Permission:ProductManager.Products.Edit"]);
            productManagement.AddChild(ProductPermissions.Products.Delete, _localizer["Permission:ProductManager.Products.Delete"]);
        }
Beispiel #3
0
        /// <inheritdoc />
        public void Define(PermissionDefinitionContext context)
        {
            /*
             * can read from database
             */
            var productGroup          = context.AddGroup(TenantPermission.GroupName, "租户管理");
            var userPermissionManager = productGroup.AddPermission(TenantPermission.Tenant.Default, "租户");

            userPermissionManager.AddChild(TenantPermission.Tenant.Create, "创建");
            userPermissionManager.AddChild(TenantPermission.Tenant.Edit, "编辑");
            userPermissionManager.AddChild(TenantPermission.Tenant.Delete, "删除");
        }
Beispiel #4
0
        /// <inheritdoc />
        public void Define(PermissionDefinitionContext context)
        {
            /*
             * can read from database
             */
            var productGroup          = context.AddGroup(ProductPermission.GroupName, "产品管理");
            var userPermissionManager = productGroup.AddPermission(ProductPermission.Product.Default, "产品");

            userPermissionManager.AddChild(ProductPermission.Product.Create, "创建");
            userPermissionManager.AddChild(ProductPermission.Product.Edit, "编辑");
            userPermissionManager.AddChild(ProductPermission.Product.Delete, "删除");


            var rolePermissionManager = productGroup.AddPermission(ProductPermission.Device.Default, "设备");

            rolePermissionManager.AddChild(ProductPermission.Device.Create, "创建");
            rolePermissionManager.AddChild(ProductPermission.Device.Edit, "编辑");
            rolePermissionManager.AddChild(ProductPermission.Device.Delete, "删除");
        }