mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-23 00:21:28 +00:00
feat(admin): scope groups to specific GitHub orgs/users
Add an optional owners[] field to groups (super-admin only). When set, only webhook events whose repository owner or organization login matches enter that group's routes; empty owners means no restriction, keeping existing routes backward compatible. - types: Group.owners?, groups.ts groupAcceptsOwners() - webhook.ts eventOwners() extracts repo owner + org login - discord.ts dispatch skips routes whose group rejects the event owner - admin-routes.ts validateGroups() validates owners list
This commit is contained in:
parent
667b8038af
commit
537f4cbb84
5 changed files with 46 additions and 1 deletions
|
|
@ -53,6 +53,12 @@ export interface Group {
|
|||
* Super admins (ADMIN_USER_IDS) always have access regardless of this list.
|
||||
*/
|
||||
adminIds: string[];
|
||||
/**
|
||||
* GitHub organization/user logins (case-insensitive) whose webhook events are
|
||||
* allowed into this group's routes. Empty/omitted = no owner restriction.
|
||||
* Only super admins may edit this field.
|
||||
*/
|
||||
owners?: string[];
|
||||
}
|
||||
|
||||
export interface Filter {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue