feat(access): keep a single owner per organization
The person who registered stays the only owner. Full day-to-day access is granted through the manager role instead of a second owner. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -138,7 +138,7 @@ const editPassword = ref('');
|
||||
const editRoleLabel = ref('');
|
||||
const editRoleId = ref('');
|
||||
const editInitialRoleId = ref('');
|
||||
/** مدیر نمیتواند نقش مالک را عوض کند؛ آن موقع فقط برچسب نقش نشان داده میشود */
|
||||
/** نقش مالک قفل است؛ مالک همان ثبتنامکننده میماند */
|
||||
const editRoleLocked = ref(false);
|
||||
|
||||
const roleFormOpen = ref(false);
|
||||
@@ -253,7 +253,7 @@ const parentRoleOptions = computed(() => {
|
||||
});
|
||||
|
||||
const inviteableRoles = computed(() =>
|
||||
roles.value.filter((r) => r.systemKey !== 'owner' || auth.user?.role === 'owner'),
|
||||
roles.value.filter((r) => r.systemKey !== 'owner'),
|
||||
);
|
||||
|
||||
function roleTreeLabel(role: OrgRoleDto) {
|
||||
@@ -482,7 +482,7 @@ function openEditUser(user: OrgUserDto) {
|
||||
editRoleLabel.value = user.orgRoleName || '—';
|
||||
editRoleId.value = user.orgRoleId ?? '';
|
||||
editInitialRoleId.value = user.orgRoleId ?? '';
|
||||
editRoleLocked.value = user.role === 'owner' && auth.user?.role !== 'owner';
|
||||
editRoleLocked.value = user.role === 'owner';
|
||||
editOpen.value = true;
|
||||
error.value = '';
|
||||
ok.value = '';
|
||||
@@ -1517,7 +1517,7 @@ onUnmounted(() => {
|
||||
</option>
|
||||
</select>
|
||||
</label>
|
||||
<p v-else class="hint">نقش فعلی: {{ editRoleLabel }} — نقش مالک را فقط مالک میتواند تغییر دهد.</p>
|
||||
<p v-else class="hint">نقش فعلی: {{ editRoleLabel }} — مالک همان کسی است که ثبتنام کرده و عوض نمیشود. برای دسترسی کامل نقش مدیر را بدهید.</p>
|
||||
</form>
|
||||
<template #footer>
|
||||
<button type="button" class="btn ghost" @click="editOpen = false">انصراف</button>
|
||||
|
||||
Reference in New Issue
Block a user