Repository navigation
Conversation
- access.granted/updated/revoked for cluster, organization and project access - user.invited and invitation.accepted (no token, URL or email) - role.updated with added/removed permissions - api_key.created/revoked with the public prefix only (never the key or its hash) - publishAfterWrite helper so events never fail a successful write - es/en translations and no-leak tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
foxkdev
force-pushed
the
feature/78-alertas-eventos-access
branch
from
November 20, 2026 13:30
1a6fe98 to
279de7f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #78 (4/4: access/roles/API keys) · Base: #86 (
feature/78-alertas-eventos-projects)Eventos
access.grantedcreateAccess(crear, invitar, asignar a organización o proyecto)userId,roleId,scopeaccess.updatedupdateAccess(también el rol a nivel cluster)userId,roleId,scope(+previousRoleId/previousStatusen el payload)access.revokedremoveAccessuserId,roleId,scopeuser.invitedinviteOrganizationUser(solo si la cuenta quedainvited)userId,roleIdinvitation.acceptedacceptInvitationuserId,roleId,scoperole.updatedupdateRoleroleId,addedPermissions,removedPermissionsapi_key.created/.revokedcreate*ApiKey/revoke*ApiKeyname(+apiKeyIden revoked)Decisiones
keyPrefix. Hay tests que lo comprueban conJSON.stringify.removeAccessen organización o cluster ya borraba la cuenta y todas sus membresías. Ahora emite unaccess.revokedpor cada membresía borrada y otro con scopeclusterpor la cuenta.invitation.acceptedemite un evento por cada membresía activada, para que cada organización o proyecto reciba el suyo.createDefaultOrganizationRoles/createDefaultProjectRoles(como pide la issue), ni para regenerar una key o reenviar una invitación (no están en el catálogo v1).organization(organization:users:read/organization:roles:read), y las API keys scopeproject(project:server-keys:read). El envoltorio siempre lleva elorganizationId/projectIdreal; los cambios a nivel cluster van con scope{}. Con esto, un admin de proyecto que no tiene permisos en la organización no puede crear alertas de acceso. Si hace falta, lo resolvemos en [Alertas] Motor de alertas: filtros por campos, destinatarios, permisos y API #79/[Alertas] UI: gestión de alertas y constructor de filtros desde el catálogo #80 permitiendo varios scopes por definición.publishAfterWrite(#lib/server/events/publish): resuelve el scope y publica sin poder romper una escritura que ya ha ido bien.Tests
bun run check✅bun run test✅ (421)🤖 Generated with Claude Code