Closed lbausch closed 3 years ago
The back end has to reduce the given links dataset. The hardship is allowing configuration of what permission groups have access to which links in the admin area. I've seen such an implementation by @clarkwinkelmann somewhere, not sure where though..
I have implemented something like this in the premium extension Formulaire, where you can choose permissions for each individual field in a form.
It's not extremely complex, but I think it's too complex for this extension if we want to keep is as easy as possible to maintain.
However we could have a permission to see the whole menu, and not for individual links.
The back end has to reduce the given links dataset.
I have to believe that we are likely only talking about just a few pages on a typical Flarum site.
The hardship is allowing configuration of what permission groups have access to which links in the admin area
I'm not sure I would call it a "hardship". A feature such as making certain things visible only to members, groups, etc. is pretty standard fare, tbh. You have permission groups that can theoretically be assigned to anything, be them pages, tags, etc. Makes no sense that links can't be restricted in this way. I haven't looked under the hood, but if something like this is truly a chore to implement, that screams architecture issue.
Also, I'm a firm believer that simplicity should apply to the end user first, the dev second. Architected properly, I can't see how this would make this extension more difficult to maintain.
The current behavior of clicking a link that you can't view simply results in a "page not found" error. Not the experience a site admin is likely going for :).
Just my 2cp :)
I don't have the Formulaire extension, so I can't use that as prior art, but if I have time, I'll try to look under the hood and see what I may be able to contribute in this area.
Available in version 0.5.1
Is it possible to make links visible to logged in users only? I would also appreciate hints for a possible implementation, so maybe I can submit a pull request.