1
0
mirror of https://github.com/flarum/core.git synced 2025-10-12 23:44:27 +02:00
Files
php-flarum/src
Toby Zerner 40a78d302e Fix permission logic priorities
This helps to fix a bug in flarum-ext-tags where a user could not rename or edit the tags of their own discussion if it was in a restricted tag. This was due to the order of GetPermission event listeners – the logic that determines that a user *can't* perform an action because of a restrictive tag was running before (and thus instead of) the logic that determines that a user *can* edit their own stuff.

The solution is to change the "catch-all" methods on Policies to "after" instead of "before" – that is, they will run only if the per-ability methods return null.

We also simplify the GetPermission event by passing the model as a sole "argument", as I can't imagine any cases where we'll need more than one argument.
2016-05-28 09:35:08 +09:30
..
2016-05-26 23:54:25 +09:00
2016-04-25 09:17:11 +09:30
2016-05-28 09:35:08 +09:30
2016-03-08 00:05:53 +09:00
2016-05-28 09:35:08 +09:30
2016-02-25 22:09:39 -05:00
2016-05-27 14:53:22 +09:30
2016-02-25 22:09:39 -05:00
2016-05-27 14:53:22 +09:30