Alexander Skvortsov
0d5510154e
Apply fixes from StyleCI
2021-05-12 00:10:22 +00:00
Alexander Skvortsov
bf5a401787
Remove flags visibility scoping
...
This was moved to flags in 9fe9dd515b
2021-05-11 20:10:10 -04:00
Sami Mazouz
fffedb4e1d
Only check for bypassTagCounts permission for startDiscussion ability ( #130 )
...
This doesn't fix anything, but we should explicitly only check the
permission for the ability it is meant for, just to be safe in the
future.
Also add more tests.
2021-05-11 16:35:10 -04:00
flarum-bot
a0f9416f90
Bundled output for commit 99009e5d3b965a2c1d67b4bbfd4861b7ad0f3627 [skip ci]
2021-05-11 20:06:14 +00:00
Alexander Skvortsov
99009e5d3b
Permission Tag Scoping Field ( #127 )
...
This allows tag scoping permissions that don't start with `discussion`, or on the contrary, removing tag scoping from permissions that DO start with `discussion`.
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2021-05-11 16:05:11 -04:00
Alexander Skvortsov
dfbb468744
Refactor queryIdsWhereCan ( #128 )
...
- Rename to queryIdsWhereHasPermission, since that's more accurate
- Make the base query an optional 3rd argument. This feels more intuitive
- Add a `can` function in AbstractPolicy, so extensions that add tag scopable permissions don't need to define their own policies (e.g. with approval)
- Combine ScopeDiscussionVisibilityWithAbility and ScopeDiscussionVisibility
- Fix ScopeDiscussionVisibility only requiring in one tag, not all.
- Add lots and lots of tests
Co-authored-by: SychO9 <sychocouldy@gmail.com>
2021-05-11 02:34:30 -04:00
flarum-bot
382729dd46
Bundled output for commit cc7e805a4bfa11637a50932cbc594285d4f0d056 [skip ci]
2021-05-10 18:22:48 +00:00
Alexander Skvortsov
cc7e805a4b
Restore searching in tags when on tag page ( #129 )
2021-05-10 14:21:43 -04:00
flarum-bot
42a1c97371
Bundled output for commit a1edbdc9b0e13f2f1ac6fc540dadadd295a8de7d [skip ci]
2021-05-04 17:58:54 +00:00
Daniël Klabbers
a1edbdc9b0
Initial tag load performance improvement ( #87 )
...
- Only load lastPostedDiscussion on TagsPage
- For forum payload, only load top-level primary tags and top 3 secondary tags.
- In other cases, load tags in dynamically when needed.
Co-authored-by: Alexander Skvortsov <sasha.skvortsov109@gmail.com>
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2021-05-04 13:57:55 -04:00
Alexander Skvortsov
712286151f
Optimize tag permissions ( #126 )
...
The new implementation generates a subquery of IDs instead of sending big arrays of data to/from the database. This massively speeds up performance.
2021-05-04 12:53:20 -04:00
Alexander Skvortsov
5235dda1e4
Use RequestUtil to access actor
2021-04-08 00:07:14 -04:00
Sami Mazouz
a1ba21ec69
Eager load tags relation in discussion, posts and flags listing endpoints ( #125 )
...
* Eager load tags relation when listing posts & discussions
* Eager load ListFlags post.discussion.tags relation
2021-03-25 15:37:14 +01:00
Ian Morland
1b339267f8
Canonical URL: Use UrlGenerator in place of extracting the url from request ( #122 )
2021-03-15 21:44:22 -04:00
Daniel Klabbers
4ff74d3289
Release v0.1.0-beta.16
2021-03-15 13:03:08 +01:00
Alexander Skvortsov
6c25f09c9b
Use non-deprecated translator interface
2021-03-13 17:11:42 -05:00
flarum-bot
208aa47e60
Bundled output for commit 932c31db6d3bd4f54ffea70b77f8f5f23749710e [skip ci]
2021-03-13 22:01:34 +00:00
Alexander Skvortsov
932c31db6d
Apply fixes from StyleCI
2021-03-13 22:00:39 +00:00
Alexander Skvortsov
ee48c97a23
Tags admin list: move edit button back to where it should be
2021-03-13 17:00:27 -05:00
Alexander Skvortsov
85de81627d
Update for beta 16
2021-03-13 16:54:03 -05:00
Alexander Skvortsov
80efe35b16
Add defaults to params that should have it.
...
This fixes PHP8 warnings about required parameters following optional ones.
2021-03-08 15:51:56 -05:00
Charlie
7c1a96119c
Change category ( #118 )
2021-03-08 14:20:41 -05:00
Sami Mazouz
b78b097724
Eagerload lastPostedDiscussion needed relationships ( #120 )
2021-03-06 10:37:26 -05:00
Daniël Klabbers
162167fe23
made compatible with illuminate 8 and beta 16 ( #121 )
2021-03-05 09:44:20 -05:00
flarum-bot
6dc433470f
Bundled output for commit 181229ae93c93a0ec812c0ad70801dac4cc8f05e [skip ci]
2021-03-05 03:16:09 +00:00
Sami Mazouz
181229ae93
Check for selectable tags before opening tag selection modal ( #112 )
2021-03-04 22:15:27 -05:00
Robert Korulczyk
0bf6384bb2
Move locale files from language pack to extension ( #99 )
2021-02-17 16:24:19 -05:00
flarum-bot
ad9eaa38b2
Bundled output for commit 42158112bf6dc0a0291cd79613d171b4f082efe4 [skip ci]
2021-02-17 13:51:41 +00:00
David Wheatley
42158112bf
Add missing Button-label span from ButtonLink ( #113 )
...
Every sideNav item created by flarum/core includes this span, so tags should too.
2021-02-17 08:50:35 -05:00
flarum-bot
03426b57a0
Bundled output for commit 300e47cfb3e9b017970afe2630708b609f36ed61 [skip ci]
2021-02-08 02:34:44 +00:00
Alexander Skvortsov
300e47cfb3
Fix editing tags ( #117 )
...
`tagLabel` expects an object with an isChild method, so we can just wrap needed data in a Tag object. We don't want to update `this.tag`, since that would mess things up if the user exits the modal without saving.
2021-02-07 18:33:49 -08:00
Charlie
1980636ed6
Max-height for tags settings ( #116 )
2021-02-07 17:11:42 -05:00
flarum-bot
0765d3fdb7
Bundled output for commit 9c77d677c6ee8ba50b519d9e25c1669460dd0bde [skip ci]
2021-02-07 06:39:33 +00:00
Alexander Skvortsov
9c77d677c6
Fix submitting TagDiscussionModal via enter key
...
The DOM submit method doesn't raise a `submit` event (https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit ), so submitting the form this way just refreshed the page (default HTML form behavior). The recommended fix (and the one implemented here) is to simulate a button-triggered submission.
Fixes https://github.com/flarum/core/issues/2595
2021-02-07 01:38:39 -05:00
flarum-bot
7f14e72626
Bundled output for commit b6ca4c8c8412d992f8a8ac5f2dae998959c9e701 [skip ci]
2021-02-01 21:03:27 +00:00
David Wheatley
b6ca4c8c84
Add "TagLabel--child" class to tagLabel to aid with custom theming ( #114 )
2021-02-01 16:02:36 -05:00
flarum-bot
3573b694e5
Bundled output for commit b985aa86316bc417ae07c9428386b775d70e38f5 [skip ci]
2021-01-26 22:09:35 +00:00
Sami Mazouz
b985aa8631
Add permission to bypass tag count requirements ( #111 )
2021-01-26 17:08:47 -05:00
SychO9
fe4803a07c
Fix starting a discussion without tags, without global startDiscussion perm
2021-01-26 17:06:14 -05:00
SychO9
c2e5c1008f
Fix starting discussion without tags
2021-01-26 17:06:14 -05:00
SychO9
5291c969a4
Null positions refer to secondary tags
2021-01-12 21:28:44 -05:00
SychO9
550a04df83
Use the correct setting keys
2021-01-12 21:28:44 -05:00
Alexander Skvortsov
c9b9c1ddce
Properly return allow / deny instead of boolean
2020-12-17 19:51:53 -05:00
Alexander Skvortsov
64d965fa17
Fix logic for determining whether users can add tags to a discussion
2020-12-16 17:31:44 -05:00
Alexander Skvortsov
c099c96703
Fix old-style return true
in policy
2020-12-16 17:31:02 -05:00
Daniël Klabbers
765254c4f5
changelog and constraint for beta 15
2020-12-15 09:41:50 +01:00
Daniël Klabbers
9429b229bb
npm audit fix
2020-12-15 09:34:41 +01:00
Alexander Skvortsov
f74a348525
Update composer metadata for admin dashboard
2020-12-08 19:58:39 -05:00
Alexander Skvortsov
bf31f3e8ec
Refactor for Policies Revamp ( #105 )
2020-12-08 19:02:08 -05:00
Sami Mazouz
384f17ea94
Use new extenders ( #102 )
2020-12-08 14:20:50 -05:00