feat: add agent roles/permissions

This commit is contained in:
Danny Avila 2024-09-03 22:03:59 -04:00
parent e54352e4c7
commit 2931d1d9cb
No known key found for this signature in database
GPG key ID: 2DD9CC89B9B50364
5 changed files with 84 additions and 13 deletions

View file

@ -28,6 +28,20 @@ const roleSchema = new mongoose.Schema({
default: true,
},
},
[PermissionTypes.AGENTS]: {
[Permissions.SHARED_GLOBAL]: {
type: Boolean,
default: false,
},
[Permissions.USE]: {
type: Boolean,
default: true,
},
[Permissions.CREATE]: {
type: Boolean,
default: true,
},
},
});
const Role = mongoose.model('Role', roleSchema);