uselagoon / lagoon

Lagoon, the developer-focused application delivery platform
https://docs.lagoon.sh/
Apache License 2.0
548 stars 147 forks source link

feat: add new organization admin role #3733

Closed shreddedbacon closed 1 week ago

shreddedbacon commented 1 month ago

General Checklist

Database Migrations

This adds a new role for organizations that allows a user to be granted admin permission, which is the same as owner except that admins cannot make changes to the management users of an organization, ie, they will not be able to add or remove other users as organization admins or owners.

The role is only designed to allow interaction with projects, groups (and the group users), and notifications.

When adding a user to an organization as a manager, there is a new boolean called admin, used in a similar way to the owner boolean. Only platform-owner and organization-owners will be able to add users as admins.

addUserToOrganization(
    input: {
        user: {
            email: "orgadmin@example.com"
        }
        organization: 1
        admin: true
    }
) {
    id
}

Also, I have renamed the realm import file to better represent that it is a base import, rather than a specific version.