Logo di User Group Administration

User Group Administration

Organizzazione
serac-labs
user-group-administration

Manage the principals ACLs apply to — sys_user, sys_user_group, sys_user_grmember and sys_user_has_role. Group before membership, inherited versus direct roles, why removing a role does not always remove the access, and deactivate rather than delete.

Panoramica

Pubblicato daserac-labs
Repositoryserac
Nome della skilluser-group-administration
Stelle
77
Fork
28
File inclusi
Solo istruzioni
LicenzaApache-2.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da serac-labs su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA User Group Administration in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/serac-labs/serac/tree/main/packages/skills/user-group-administration
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/serac-labs/serac.git /tmp/serac
mkdir -p .claude/skills
cp -r /tmp/serac/packages/skills/user-group-administration .claude/skills/user-group-administration
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva User Group Administration in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente User Group Administration non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi User Group Administration non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Users, Groups and Roles

acl-security teaches the rules. This teaches the things the rules apply to. Without it an agent asked to "add Sam to the change team" writes a background script against sys_user_grmember, which works right up until it silently creates a second membership row.

Four tables

TableHolds
sys_userpeople
sys_user_groupgroups
sys_user_grmemberone row per (user, group) membership
sys_user_has_roleone row per (user, role) grant — direct and inherited

There is no list of members on the group and no list of roles on the user. Both are join tables, and both are where the work happens.

Order of operations

Group before membership, role before grant. Every one of these is a reference field with no auto-create behind it:

javascript
// 1. the group
const grp = await snow_role_group_manage({ action: "create_group", name: "Database — Change",
                                           manager: managerSysId, description: "Owns DB change approvals" })

// 2. then people into it — takes sys_id, username OR email, so no lookup step
await snow_manage_group_membership({ action: "add", group_identifier: "Database — Change",
                                     user_identifier: "sam.patel@example.com" })

// 3. and a role onto the group, so membership grants it
await snow_role_group_manage({ action: "assign_role", role: roleSysId, group: grp.sys_id })

snow_manage_group_membership checks for an existing membership before inserting, which a hand-written GlideRecord.insert() does not. Duplicate sys_user_grmember rows do not break access — they break removal, because the remove path deletes one row and the user is still a member.

Inherited versus direct: the part that bites

A role reaches a user two ways, and sys_user_has_role holds both:

  • Direct — a row with inherited = false, created when someone grants the role to the person.
  • Inherited — a row with inherited = true, created by the platform when the user joins a group that has the role, or when a role the user holds contains another role.

snow_get_user_roles returns every row on sys_user_has_role for the user, with display values. Read the inherited flag on each one before concluding anything:

javascript
const roles = await snow_get_user_roles({ user_id: userSysId })
const direct = roles.roles.filter((r) => r.inherited === "false")

This is why removing a role does not always remove the access. Revoke the direct grant and the user still holds the role, because a group they are in also grants it — the inherited row is untouched and was never yours to delete. Two rules follow:

  1. Before revoking, look at all the rows for that role. If any is inherited=true, the fix is group membership, not the grant.
  2. Never delete an inherited=true row by hand. The platform maintains those; it will recreate them, and in the meantime access does not change.

Role containment compounds this: itil_admin contains itil, so granting the first produces an inherited itil row as well. Someone who "only has itil_admin" has both.

One caution on assign_role with a group

snow_role_group_manage({ action: "assign_role", group }) writes its row to sys_user_has_role. On a stock instance the group→role join is sys_group_has_role, so verify what landed before you rely on it:

javascript
await snow_query_table({ table: "sys_group_has_role", query: "group=" + grp.sys_id, fields: "role,inherited" })

If that comes back empty after the call, grant the role to the group in the UI (Group → Roles related list) instead and use the tool only for user grants.

Deactivate, never delete

snow_user_manage({ action: "deactivate", user_id }) sets active = false. That is the only removal the tool offers, deliberately.

A sys_user record is referenced from every task the person ever touched — opened_by, assigned_to, sys_created_by, every journal entry, every approval. Deleting it leaves those references dangling and the history unreadable. Deactivating it blocks login, drops the user out of assignment lookups, and keeps every reference intact.

Deactivation does not remove group memberships or roles. Those rows stay, which is correct — if the person returns, or if an audit asks what access they had in March, the answer is still there. If access must be provably gone as well, remove the memberships explicitly:

javascript
const groups = await snow_query_table({ table: "sys_user_grmember", query: "user=" + userSysId,
                                        fields: "group" })
for (const row of groups.records) {
  await snow_manage_group_membership({ action: "remove", user_identifier: userSysId,
                                       group_identifier: row.group.value })
}
await snow_user_manage({ action: "deactivate", user_id: userSysId })

Same for groups: a group with history should be deactivated (active = false), not deleted. Deleting one orphans every sys_user_grmember row pointing at it and every assignment that used it.

Reading before writing

Two queries answer most "who can do X" questions without changing anything:

javascript
// everyone in a group, with details
await snow_manage_group_membership({ action: "list", group_identifier: "Database — Change" })

// every group a user is in
await snow_query_table({ table: "sys_user_grmember", query: "user=" + userSysId, fields: "group" })

Related

  • acl-security — what the roles are checked against.
  • instance-security — instance-level hardening; a different subject from who holds what.
  • domain-separation — on a domain-separated instance, a group and its members live in a domain, and a membership across domains does not do what it looks like.

Domande frequenti

Cosa fa la skill IA User Group Administration?

Manage the principals ACLs apply to — sys_user, sys_user_group, sys_user_grmember and sys_user_has_role. Group before membership, inherited versus direct roles, why removing a role does not always remove the access, and deactivate rather than delete.

Perché usare User Group Administration su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. User Group Administration è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo User Group Administration in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/serac-labs/serac/tree/main/packages/skills/user-group-administration. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare User Group Administration?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con User Group Administration?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con User Group Administration: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA User Group Administration è gratuita?

Sì. È pubblicata su GitHub da serac-labs con licenza Apache-2.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇