هناك إعداد يسمح للمشرفين بإدارة الفئات.
إذا تم تفعيل هذا، يمكن للمشرفين تغيير إعدادات الأمان للفئة بحيث يفقدون الوصول إليها، وهو أمر من المرجح أن يكون عرضيًا.
يمكن للمسؤولين بالطبع استعادة هذا الوضع.
أقترح معالجة هذا السلوك بمنع المشرفين من تغيير الفئة بطريقة تفقدها الوصول.
6 إعجابات
sam
(Sam Saffron)
11 ديسمبر 2025، 10:15م
2
أتفق، على الأقل نوع من التحذير بأن هذا سيحدث مع تأكيد.
إعجابَين (2)
شكرًا على التقرير @Steradiant
سنعرض الآن مربع حوار تأكيد إذا كان المستخدم على وشك فقدان الوصول إلى فئة عن طريق تغيير أذوناتها
main ← prevent-moderator-self-lockout
opened 04:23PM - 12 Dec 25 UTC
When moderators with `moderators_manage_categories` enabled change category perm… issions, they could accidentally remove their own access, requiring admin intervention to fix.
This adds a client-side confirmation dialog that warns moderators before saving permission changes that would lock them out. If confirmed, the changes are saved and the user is redirected to the home page.
Changes:
- Add `_wouldLoseAccess()` check in edit-category controller that compares new permissions against the user's group memberships
- Show confirmation dialog via `dialog.yesNoConfirm()` before saving
- Redirect to home page after confirmed save (since user can no longer access the category edit page)
- Fix `onSelectGroup` to properly set `group_id` for custom groups by looking up from `site.groups` (was only working for auto groups)
Here's how the confirm dialog looks like
<img width="1606" height="1043" alt="CleanShot 2025-12-12 at 17 12 55" src="https://github.com/user-attachments/assets/86e255dc-fa5c-4fde-8c86-3d3b0e03ce89" />
Ref - https://meta.discourse.org/t/390978
إعجاب واحد (1)