• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Custom User Fields Permissions 1.0.1

No permission to download

cclaerhout

Well-known member
#1
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...
 

TheLaw

Well-known member
#4
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.
 

cclaerhout

Well-known member
#5
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.
 

mcatze

Well-known member
#9
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.
 

cclaerhout

Well-known member
#10
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.
 

mcatze

Well-known member
#12
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
 

cclaerhout

Well-known member
#13
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(); 
}
 

cclaerhout

Well-known member
#15
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.
 
#19
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
 

Xon

Well-known member
#20
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;