1
0
mirror of https://github.com/flarum/core.git synced 2025-06-01 12:05:54 +02:00
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-27 13:53:50 +09:30
2016-05-27 13:56:56 +09:30
2016-02-25 22:09:39 -05:00
2015-10-22 12:25:22 +10:30
2016-05-28 09:35:08 +09:30
2016-02-26 13:47:17 +10:30
2015-11-01 16:00:25 +10:30
2016-01-02 07:08:58 +01:00
2015-11-01 16:00:25 +10:30

Flarum Core

This repository contains Flarum's core code. If you want to set up a forum, visit the main Flarum repository.

Contributing

Flarum is open-source and we would love your help building it! Please read the Contributing Guide to learn how you can help.

Description
No description provided
Readme 119 MiB
Languages
PHP 65.5%
JavaScript 14.2%
TypeScript 13.9%
Less 5.5%
Blade 0.7%
Other 0.2%