Thanks much for this module! I just downloaded the Dec 28th update, and noted one problem.

I created a user node for user information. This contains registration information, such as a phone number, that only admin and the node author can view, add or update.

I assigned the non-admin roles content-phone field create and update but NOT view. With this, they can see the titles, but not the phone number of other users. This is fine.

However, when the non-admin users go into their own user node, they cannot view their own phone number. Worse yet, when they edit their user node, the phone number field is blank. The admin role, though, CAN see the phone number in both view and edit mode.

Would it make the module too complex to add a content field 'view own' permission? If this is not possible, it would help to minimally display the CCK field information in edit mode.

Thanks much!

Comments

arthurf’s picture

Status: Active » Fixed

ok, the cvs version of the 4.7 has support for this. the permission names have changed, you'll need to update those. Let me know if you have any issues with it.

thanks

arthur

bobbia’s picture

Status: Fixed » Active

Thank you very much for the quick update! I installed cck_field_perms.module,v 1.4.2.5 2007/01/03 04:15:34 and tested it.

I gave access to the authorized user to:

-create user node First Name
-edit own user node First Name

Admin has access to all the permissions for this field (create, edit own, and edit)

When the authorized user views his user node information, he doesn't see any first name details - neither the title nor his first name.

When the authorized user edits his user node, the first name field is gone - both the title and the input. Therefore, the authorized user cannot edit the field, since he can't even see it.

Furthermore, when admin views the authorized user' node page, they receive the following warning:

Warning: Invalid argument supplied for foreach() in .../modules/cck_field_perms/cck_field_perms.module on line 95.

Admin CAN view the title and first name, though. When admin clicks 'edit', they can also see the title and first name of the authorized user, as expected.

I am sure that once we get these few bugs worked out that the 'edit own' will be a great enhancement.

Thanks much!

arthurf’s picture

Ok, I've fixed the foreach issue that you identified (grab the latest cvs for the fix). The perms issue is a bit strange to me- I did not encounter this issue. When you say:

I gave access to the authorized user to:

-create user node First Name
-edit own user node First Name

Admin has access to all the permissions for this field (create, edit own, and edit)

When the authorized user views his user node information, he doesn't see any first name details - neither the title nor his first name.

Did you give the authorized user access to those fields? Sorry for the dumb question, but need to ask.

When the authorized user edits his user node, the first name field is gone - both the title and the input. Therefore, the authorized user cannot edit the field, since he can't even see it.

This suggest to me that the user doesn't have the right perms. Because I changed the names of things, it would have reset things for the user- can you double check that?

scottgifford’s picture

I still didn't see this feature in the Drupal 5 version. I coded up something myself, let me know if anybody's interested and I'll attach a patch.