0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-05 22:42:07 +08:00
discourse/.skills
Martin Brennan e590d2a2d5
DEV: Add banned_acl concept to AccessControlList (#41254)
Introduces a server-side definition of banned_acl,
similar to mandatory_acl from 5823e4e3b2

This allows AclTarget implementing classes to define
which ACLs cannot be used for certain types. For example:

```
def self.banned_acl
  [{ type: :group, id: Group::AUTO_GROUPS[:anonymous_users], permission: "edit" }]
end
```

This prevents anonymous users group from being able to have the Edit
permission on the target, which is practical because the anonymous
user is not logged in and generally cannot create/edit anything.

This restriction is passed to the DAccessControl component via the Site
serializer, same as mandatory_acl, and is used to prevent the user from
selecting the banned ACLs in the UI.

Then, server-side this rule is enforced in `AccessControlListManager`
service as a policy.

**Before**

<img width="971" height="287" alt="image"
src="https://github.com/user-attachments/assets/af4ace0f-7b11-4005-8344-774d554693f0"
/>


**After**

<img width="914" height="194" alt="image"
src="https://github.com/user-attachments/assets/b756b976-f6e6-4331-b27d-c9a2d13997aa"
/>
2026-06-29 16:22:30 +10:00
..
discourse-acl-authoring DEV: Add banned_acl concept to AccessControlList (#41254) 2026-06-29 16:22:30 +10:00
discourse-admin-ui DEV: Add a Discourse admin UI skill (#41040) 2026-06-19 16:19:35 +10:00
discourse-ai-llm-presets DEV: Refresh default LLM presets and pricing (#39673) 2026-04-30 17:02:32 -03:00
discourse-migration DEV: Warn against schema changes in transaction-disabled migrations (#40360) 2026-05-28 17:23:15 +08:00
discourse-pr DEV: Tweaks for discourse-pr skill (#39643) 2026-04-30 10:36:06 +01:00
discourse-screenshots DEV: Add theme screenshots system spec and skill (#39426) 2026-05-05 09:36:29 -04:00
discourse-service-authoring DEV: tasks and autonomous mode for service skill (#38619) 2026-03-16 10:21:04 +01:00
discourse-upcoming-changes DEV: Make upcoming change CSS classes opt-in (#40669) 2026-06-10 12:12:58 +10:00
discourse-upcoming-changes-authoring DEV: document hide settings in upcoming change skill (#41045) 2026-06-19 11:57:59 +04:00
discourse-writing-html-css DEV: Add CSS repair guidance to HTML/CSS skill (#41074) 2026-06-29 09:07:25 +10:00
discourse-writing-js-tests DEV: Update test module name conventions (#40389) 2026-05-29 15:19:55 +10:00
discourse-writing-rspec-tests DEV: Replace JS build system with Rolldown (#35963) 2026-05-29 11:11:55 +01:00