I can't seem to figure out how to fix the settings so that a role can create a node field say, "City Distance" but not be able to edit this field. However, any other user in this role can edit this field and save the node.
For example: User 1 (Role A) creates job posting node. Saves it.
note: User 1, upon creating node, does not see field: "City Distance"
Upon editing this node, User 1, still does not see field: "City Distance"
Now, User 2 (also Role A), can view this Job Posting node, However, User 2 can see and edit, "City Distance", whereas, the original author does not have this capability.
I thought that by selecting "Edit Own" in field preferences, this would disable the feature.. then, in permissions, leave this checkbox blank. Yet, the orinal author can still edit this field. I don't understand what I'm doing wrong.
My settings in field preferences:
Create (checked)
Edit (unchecked)
Edit own (checked)
Permissions:
Create (unchecked)
Edit own (unchecked)
Content permissions:
Edit (checked)
Comments
Comment #1
Danic CreditAttribution: Danic commentedIt's most likely not working due to #965126: Better documentation on how to use Field Permissions
Comment #2
calefilm CreditAttribution: calefilm commentedThanks! but No. I answered that one.
Anyway, my problem is very simple but I don't think there is a solution.
Current Options available in Drupal:
Comment #3
giullina CreditAttribution: giullina commentedI have the very same problem (or rather, the same need to have fields which are automatically created but not editable by the author). It seems like it could be a very useful feature, think for example giving submitted content an internal code, or advancement status decided by admins.
Comment #4
calefilm CreditAttribution: calefilm commentedI agree. I hope Drupal core becomes more advanced in terms of permissions. This would be most useful.
Comment #5
bryancasler CreditAttribution: bryancasler commentedsubscribe
Comment #6
ramper CreditAttribution: ramper commentedOne way to achieve something like this (although it doesn't look like the most efficient way, for sure) is by setting up one extra role (with the attendant requirements of setting permissions all over again) and using the rules module to move the original author to this new role after creating the content. The rule that modifies the user role should be set up to get triggered upon submission of the newly created content. The new role for the author could be almost identical to the first role, with only the permission to edit certain fields (or entire content) removed, as needed.
Comment #7
Thomas_Zahreddin CreditAttribution: Thomas_Zahreddin commentedhm, i'm not sure if i understood the problem completely:
I solve this kind of problem with a refereced node: User A edits a node with fields form a referenced node, that only User B can edit.
So i can show fieldvalues on a node a user can not edit.
Comment #8
lgammo CreditAttribution: lgammo commentedThis applies to:
version = "7.x-1.0-beta2"
core = "7.x"
project = "field_permissions"
datestamp = "1327510549"
IMHO, I think the problem is that the definitions of these two permissions are not precise enough:
#1) Edit own value for field X
#2) Edit anyone's value for field X
In #2, the word 'anyone' includes the author, therefore, it is impossible to give a user the permission to edit someone else's field ***without giving them the permission to edit their own field*** in their own content.
In other words: anyone means ***anyone*** including the current user.
Now, I have modified the definition like this:
#1) Edit own value for field X
#2) Edit anyone ***ELSE***'s value for field X
The old #2 permission (Edit anyone permission) is achieved by enabling the two new permissions.
To achieve this I modified the code in field_permissions.module as follows:
This is briefly tested, so I will not claim robustness.
Please check this out, and tell me if this works for you...
Comment #9
rkostov CreditAttribution: rkostov commentedThis works for me.
Comment #10
mariacha1 CreditAttribution: mariacha1 at ThinkShout commentedD6 version is no longer supported.