-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[com_fields] Confusing Permissions #12693
Comments
Please have a look here joomla-projects/custom-fields#75 it is describing what this rule does. |
It is not obvious at the least (at reading the tip which therefore should be modified) and we do not have specific permissions to access the Fields and Fields Groups to create/edit/ etc.) |
This edit value permission is used when the user edits an article. It defines who can edit a field in the article and not when the user is editing a field itself. |
Which means the tip is wrong on one hand as not enough descriptive. |
What would you then see for a descriptive text? |
Well it would first clearly state that it concerns custom fields. But my question does not only concern this new Permission. It also concerns the general permissions of com_fields, I mean then for example
and also display or not the menus Fields and Field Groups with As far as I understood your code, it checks sometimes for the permissions in Users, Content, Contact, but never com_fields own permissions |
To clarify a bit more if necessary: |
The permissions should always being considered from the component the field belongs to for example here https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_fields/views/fields/view.html.php#L94. Where did you see code where it isn't? |
It should use also com_fields permissions for which we do NOT have any UI. |
We never had the case to have permissions for two different use cases in the same component on core as we have now. Sonner or later we would come to that point. So we need to find a solution for that problem. But honestly would that use case exist that somebody has access to the back end and can edit articles but not the custom fields of them, sounds for me very theoretical. |
It is not theoretical at all. |
I agree that creating a field must be a different permission to using a
field
|
I'd say that will happen a lot of times. An admin would set up the custom fields for a site and authors, managers and the like are using them. Imho, there should be a menu item for com_fields with an own UI where you can manage all the custom fields from all extensions in a central place. As a user I would have expected such a manager. And there, you could have all the global permissions, overrideable on at least group level. |
@laoneo I did keep telling you that there should be a com_fields menu item at that fields should be created there ;) |
Sorry but that discussion was long time ago over. Now it is definitely too late to change it. I'm not going to repeat myself why it should have it's own UI and why not. Sorry but we had this project open for months and now after the merge you want to change the whole architecture of it. @brianteeman I know and I hopefully gave you enough arguments not to do. I had the impression I could convince you 🙈 |
It is never to late to do the right thing.
That is no argument at all. If there are major issues with the current architecture, it needs to be changed or removed again or we end up with yet another technical debt. |
@laoneo you convinced me enough to compromise on all aspects that I had considered - i obviously hadnt considered the acl - my fault I absolutely share your disappointment that people never tested anything in the 9 months + that this has existed. Unfortunately those of us who did do significant testing are not developers so couldnt comment on code architecture. As I have mentioned in the maintainers group I am very surprised that something as fundamental as the architecture (extending categories) was not reviewed by the PLT 9 months + ago. It would have seem logical to me that this was done before you were asked to spend such a considerable amount of time on this PR. Some of the most vociferous comments here are by people who had the skill and ability to test and were asked numerous times to test but for whatever reason did not. I share you frustration with that and there comments and language |
I'm sure we can solve the ACL issue differently than interrogate the whole architecture. You need to see the whole picture. @Bakual did you try to integrate it into one of your components? If not, then spend some time to do it and you will see hopefully that it would make sense how it is now. |
@laoneo That's what I currently try to do and why I stumbled over the things. |
I guess, without redoing all under a unique Fields Component, we could at least implement a com_fields menu which would deal only with ACL. That would not force to redo the whole architecture. |
I suggest to either try to have multiple rules in the component options, or to implement permission inheritance from a field group, when a field is assigned to a group. I would go with option two as it is probably easier to implement. Like that you can define who can manipulate the fields which belong to this field group. The field group will then inherit from the component options. All would look then consistent how a user would expect it. If the field is not assigned to a group, it inherits the permissions from the component it belongs to directly. I really would NOT go the way to give com_fields it's own menu item just because of ACL as com_categories also doesn't have one. Was there ever a request to manage categories for all components from it's own menu item? |
I don't know if that was ever requested or not, but com_fields isn't com_categories. It does something completely different. Personally I think the fields don't need the permission tab. They could indeed inherit from the field groups and component (3rd party or com_fields, needs to be decision) permissions. |
I can understand the low level of happiness :-), I did merge it to move forward with com_fields and figure out what could be done better. We need more people looking at it, it is important not repeat the mistakes we made with com_tags. More people also mean more and different ideas and this is a good thing in my opinion. I don't think anything must be done by you @laoneo we can work together to make it the best possible solution. |
IMO a field does need it's own permission, especially the edit value permission as it can be very likely that setting a field value, when editing an article, should only be possible by an admin.
Yes it does something different, but how it should be integrated should be the same way. It should look like that custom fields does belong to the component which is integrating it. At least that was my intention, because I tought that Joomla should be slimm on the Interface (thats why there is plan to remove some core extensions like web links or banners). But perhaps I'm wrong.
That's why I suggested to inherit the permission from the field group (category) to the field.
No comment here, but thanks for being positive. |
I think most useful permission is the "Edit value" permission that controls which users can modify the field in article / record form (probably the only permission need to the fields, that is why you cannot remove the assets from them)
[EDIT] |
But this is true too, if you take the needed "edit-value" permission and you replace it with a multi-value selection of usergroups (not same as ACL but more than enough), then i guess you can remove all asset stuff for the fields [EDIT] |
Can we close this one as with the new field groups #13019 ACL is stabilized? |
Steps to reproduce the issue
As Super User, create an article custom field.
![screen shot 2016-11-02 at 08 36 17](https://cloud.githubusercontent.com/assets/869724/19920201/7ac95a4c-a0d7-11e6-86e7-2220fbcb0a47.png)
Also Create a Field Group
Logout and login as Manager or Administrator (Permissions for Edit Value is Not Allowed per default) for BOTH Fields and Field Groups
Expected result
Not sure
Actual result
The Manager or Administrator can edit anything in the field (and save) EXCEPT its Type which is readonly.
![screen shot 2016-11-02 at 08 39 14](https://cloud.githubusercontent.com/assets/869724/19920255/ea0d2b2c-a0d7-11e6-93d3-3fa81d581ee6.png
The Manager or Administrator can edit anything in the Field Group (and save)
Additional comments
This new permission tip is confusing. What is Edit Value really for?
The text was updated successfully, but these errors were encountered: