mirror of
https://github.com/outline/outline.git
synced 2026-06-30 19:47:28 +03:00
a8c2612734
This change adds an admin role to GroupUser that allows group admins to: 1. Administer other users in the group 2. Change the group name Changes include: - Database migration to add isAdmin field to group_users table - Updated GroupUser model to include isAdmin field - Added isGroupAdmin policy utility function - Updated group policy to allow group admins to update groups - Added API endpoints for managing admin status - Updated GroupUsersStore to handle admin functionality - Added tests for the new functionality
16 lines
337 B
JavaScript
16 lines
337 B
JavaScript
"use strict";
|
|
|
|
module.exports = {
|
|
async up(queryInterface, Sequelize) {
|
|
await queryInterface.addColumn("group_users", "isAdmin", {
|
|
type: Sequelize.BOOLEAN,
|
|
allowNull: false,
|
|
defaultValue: false,
|
|
});
|
|
},
|
|
|
|
async down(queryInterface) {
|
|
await queryInterface.removeColumn("group_users", "isAdmin");
|
|
},
|
|
};
|