Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Update GroupRole numbering (#2159)

Leendert de Borst55365cff7035
diff --git a/apps/server/Databases/AliasServerDb/GroupRole.cs b/apps/server/Databases/AliasServerDb/GroupRole.cs
index 6e9b60059..cf5da66a6 100644
--- a/apps/server/Databases/AliasServerDb/GroupRole.cs
+++ b/apps/server/Databases/AliasServerDb/GroupRole.cs
@@ -8,14 +8,14 @@
namespace AliasServerDb;
/// <summary>
-/// Group roles.
+/// Group roles. Lower values mean more privileges: the highest role is 0.
/// </summary>
public enum GroupRole
{
/// <summary>
- /// Can use shared folders they hold a grant on.
+ /// The group's owner: everything an admin can do, plus managing the group's plan and deleting the group itself.
/// </summary>
- Member = 0,
+ Owner = 0,
/// <summary>
/// Can invite and remove members and administer the group's shared folders.
@@ -23,7 +23,7 @@ public enum GroupRole
Admin = 1,
/// <summary>
- /// The group's owner: everything an admin can do, plus managing the group's plan and deleting the group itself.
+ /// Can use shared folders they hold a grant on.
/// </summary>
- Owner = 2,
+ Member = 2,
}
diff --git a/apps/server/Databases/AliasServerDb/Migrations/20260728102956_AddGroupsAndSharedOwnership.cs b/apps/server/Databases/AliasServerDb/Migrations/20260728102956_AddGroupsAndSharedOwnership.cs
index 0a20f78c0..0058ee363 100644
--- a/apps/server/Databases/AliasServerDb/Migrations/20260728102956_AddGroupsAndSharedOwnership.cs
+++ b/apps/server/Databases/AliasServerDb/Migrations/20260728102956_AddGroupsAndSharedOwnership.cs
@@ -137,7 +137,7 @@ namespace AliasServerDb.Migrations
WHERE NOT EXISTS (SELECT 1 FROM "Groups" g WHERE g."Id" = u."PersonalGroupId");
INSERT INTO "GroupMembers" ("Id", "GroupId", "UserId", "Role", "CreatedAt", "UpdatedAt")
- SELECT gen_random_uuid(), u."PersonalGroupId", u."Id", 2, now(), now()
+ SELECT gen_random_uuid(), u."PersonalGroupId", u."Id", 0, now(), now()
FROM "AliasVaultUsers" u
WHERE NOT EXISTS (SELECT 1 FROM "GroupMembers" m WHERE m."GroupId" = u."PersonalGroupId" AND m."UserId" = u."Id");