• Resolved joshhowenstine

    (@joshhowenstine)


    I have over 20 roles that I have added with the user role editor plugin. Some of them have short role id’s like “csc”. When I upload a file with permissions to that role the user can not see it on the front end. However, if I do the same thing with a role that contains 4 letters and above it works fine.

    Any help would be most appreciated, I have been fumbling around the plugin looking for a solution all day.

    Thanks!

    https://www.ads-software.com/plugins/wp-filebase/

Viewing 1 replies (of 1 total)
  • Thread Starter joshhowenstine

    (@joshhowenstine)

    Here is how I fixed the issue. It was caused by a mysql default.

    [mysqld]
    ft_min_word_len=3 change to

    [mysqld]
    ft_min_word_len=1

    However I do not have access to mysql settings on my production server for this project so I used the following to fix the issue.

    edit classes/item.php line 557

    $permission_sql .= ” OR MATCH($permissions_field) AGAINST (‘{$ur}’ IN BOOLEAN MODE)”;

    Changed to:

    $permission_sql .= ” OR $permissions_field LIKE ‘%$ur|%’ OR $permissions_field LIKE ‘%|$ur|%’ OR $permissions_field LIKE ‘%$ur|%'”;

    Hope this helps if you run into this issue

Viewing 1 replies (of 1 total)
  • The topic ‘Permissions not working with roles that have an ID under 3 letters long’ is closed to new replies.