Resource icon

Custom User Fields Permissions 1.0.1

No permission to download

cclaerhout

Well-known member
cclaerhout submitted a new resource:

Custom User Fields Permissions - Set input/output permissions for Custom User Fields

Custom User Fields Permissions

Addon presentation
This addon allows you to set permissions for Custom User Fields:
  • Input permissions: select which usergroups can access and edit the custom field (supports the 3 original locations)
  • Output permissions on profile pages: select which usergroups can access the custom field on profile pages
  • Output permissions in message user info: select which usergroups can access the...

Read more about this resource...
 
I'm hoping to apply the view permissions to be set to limit certain user groups. While I can hack this into the template, I'm guessing there is an easier way to do this and say "allow the following based upon the permissions set for user profile pages." I have this field appearing elsewhere but it can be linked using the same set of permissions for public display everywhere.

Thank you very much for making this possible. It's truly indispensable.
 
I'm hoping to apply the view permissions to be set to limit certain user groups. While I can hack this into the template, I'm guessing there is an easier way to do this and say "allow the following based upon the permissions set for user profile pages." I have this field appearing elsewhere but it can be linked using the same set of permissions for public display everywhere.

Thank you very much for making this possible. It's truly indispensable.
If there's a question, I don't understand it.
 
I tried it in 1.5.7 and the permissions doesn't work. I tested many scenarios with different user groups, but the custom user field is always or never visible.
 
I tried it in 1.5.7 and the permissions doesn't work. I tested many scenarios with different user groups, but the custom user field is always or never visible.
Tested with 1.5.8 (I've just upgraded my dev board for that purpose) and can't find any problems. If someone finds more information, I will look at it.
 
  • Like
Reactions: Xon
I checked it again and again .. and found something weird.
At first i use a customized UI.X Style, but no add-on which change custom fields.

The add-on works fine in message_user_info but failed in profile pages. But only if the custom field display location is "contact details". If its personal details all is fine.

I've tested now over 45min with different user.

Thanks to @cclaerhout & @Xon for testing .. :D
 
I checked it again and again .. and found something weird.
At first i use a customized UI.X Style, but no add-on which change custom fields.

The add-on works fine in message_user_info but failed in profile pages. But only if the custom field display location is "contact details". If its personal details all is fine.

I've tested now over 45min with different user.

Thanks to @cclaerhout & @Xon for testing .. :D
Then the issue is not from the admin side, but the public one and more precisely the public view.

Look at the three files of this directory. They all begin with this code:
PHP:
if(is_callable('parent::renderHtml')) {
    parent::renderHtml(); 
}

This code purpose was to allow other addons to extend the same public views than this addon extends. XenForo doesn't have any specific file for these views. I think the above code should be compatible with the XenForo proxy class system (XFCP).
The views are :
  • XenForo_ViewPublic_Member_View
  • XenForo_ViewPublic_Account_Preferences
  • XenForo_ViewPublic_Account_PersonalDetails
Check if the addon you mentioned also interferes with these views (in its listeners you'll get this information very quickly) and check if the code cares to be extendable or not. Try to use the same code than the one above:
PHP:
if(is_callable('parent::renderHtml')) {
    parent::renderHtml(); 
}
 
Works fine for me in XF 1.5.x, are you using a custom theme or have any other add-ons which change custom field?

no custom style, no addons wich change custom field. I check it again tomorrow with 1.5.8 (after upgrade)
 
no custom style, no addons wich change custom field. I check it again tomorrow with 1.5.8 (after upgrade)
Please refer to my previous message (with the views). If you don't know what it is, disable addon one by one to check if it changes anything. If it does, please contact the addon author and tell him to look my previous post. Thanks.
 
Is it possible for selected user groups to be able to edit other users custom field on the front end? Just so I can allow moderators to edit them without ACP access.

Thanks in advance,
Carl
 
Trying to upgrade to XF2 with Version 1.0.1 installed gives the following error:
Code:
MySQL query error [1364]: Field 'sedo_perms_input_val' doesn't have a default value

Patch to fix this: https://github.com/Xon/xen_CufPerms/archive/1.0.2.zip

Manual SQL to fix:
Code:
alter table xf_user_field
    CHANGE COLUMN `sedo_perms_input_val` sedo_perms_input_val BLOB DEFAULT NULL,
    CHANGE COLUMN `sedo_perms_output_pp_val` sedo_perms_output_pp_val BLOB DEFAULT NULL,
    CHANGE COLUMN `sedo_perms_output_ui_val` sedo_perms_output_ui_val BLOB DEFAULT NULL;
 
Back
Top Bottom