Revert "fix(acl): add rolesUsers through collection"
This reverts commit 86309e33be.
# Conflicts:
#	packages/plugins/@nocobase/plugin-acl/src/server/server.ts
			
			
This commit is contained in:
		
							parent
							
								
									7739778ffc
								
							
						
					
					
						commit
						8f29fde008
					
				@ -381,46 +381,6 @@ export class PluginACL extends Plugin {
 | 
				
			|||||||
          default: true,
 | 
					          default: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      const data = {
 | 
					 | 
				
			||||||
        name: 'rolesUsers',
 | 
					 | 
				
			||||||
        title: 'rolesUsers',
 | 
					 | 
				
			||||||
        hidden: true,
 | 
					 | 
				
			||||||
        fields: [
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            name: 'roleName',
 | 
					 | 
				
			||||||
            type: 'string',
 | 
					 | 
				
			||||||
            interface: 'input',
 | 
					 | 
				
			||||||
            isForeignKey: true,
 | 
					 | 
				
			||||||
            uiSchema: {
 | 
					 | 
				
			||||||
              type: 'string',
 | 
					 | 
				
			||||||
              title: 'roleName',
 | 
					 | 
				
			||||||
              'x-component': 'Input',
 | 
					 | 
				
			||||||
              'x-read-pretty': true,
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            name: 'userId',
 | 
					 | 
				
			||||||
            type: 'bigInt',
 | 
					 | 
				
			||||||
            interface: 'integer',
 | 
					 | 
				
			||||||
            isForeignKey: true,
 | 
					 | 
				
			||||||
            uiSchema: {
 | 
					 | 
				
			||||||
              type: 'number',
 | 
					 | 
				
			||||||
              title: 'userId',
 | 
					 | 
				
			||||||
              'x-component': 'InputNumber',
 | 
					 | 
				
			||||||
              'x-read-pretty': true,
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        timestamps: true,
 | 
					 | 
				
			||||||
        autoGenId: false,
 | 
					 | 
				
			||||||
        autoCreate: true,
 | 
					 | 
				
			||||||
        isThrough: true,
 | 
					 | 
				
			||||||
        sortable: false,
 | 
					 | 
				
			||||||
      };
 | 
					 | 
				
			||||||
      const r = this.db.getRepository('collections');
 | 
					 | 
				
			||||||
      if (r) {
 | 
					 | 
				
			||||||
        await r.create({ values: data });
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this.app.on('beforeInstallPlugin', async (plugin) => {
 | 
					    this.app.on('beforeInstallPlugin', async (plugin) => {
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@ import { afterCreateForForeignKeyField } from '../hooks/afterCreateForForeignKey
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
export default class DropForeignKeysMigration extends Migration {
 | 
					export default class DropForeignKeysMigration extends Migration {
 | 
				
			||||||
  async up() {
 | 
					  async up() {
 | 
				
			||||||
    const result = await this.app.version.satisfies('<0.14.0-alpha.8');
 | 
					    const result = await this.app.version.satisfies('<0.8.0');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!result) {
 | 
					    if (!result) {
 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
@ -9,6 +9,7 @@ import * as actions from './actions/users';
 | 
				
			|||||||
import initAuthenticators from './authenticators';
 | 
					import initAuthenticators from './authenticators';
 | 
				
			||||||
import { JwtOptions, JwtService } from './jwt-service';
 | 
					import { JwtOptions, JwtService } from './jwt-service';
 | 
				
			||||||
import { enUS, zhCN } from './locale';
 | 
					import { enUS, zhCN } from './locale';
 | 
				
			||||||
 | 
					import { parseToken } from './middlewares';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface UserPluginConfig {
 | 
					export interface UserPluginConfig {
 | 
				
			||||||
  name?: string;
 | 
					  name?: string;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user