WordPress.org

Ready to get started?Download WordPress

Forums

User Access Manager
Conflict with custom types? (3 posts)

  1. sfhd
    Member
    Posted 3 years ago #

    I use the 'wiki' custom type (from the 'eSimple Wiki' plugin) on my site. After installing the UAM plugin, none of my users (including admin) was allowed any more to edit any of the wikis.

    Looking at the UAM code suggests that part of the problem is that custom type objects have no categories assigned to them (at least not without a further hack).

    I got everything working again by hacking 'UserAccessManager.class.php'. I modified the two respective passages with the 'wp_die' command as follows. The first (around line 942):

    if(get_the_category()) {
            if ($noRights) {
               wp_die(TXT_UAM_NO_RIGHTS);
            }
    }

    And the second (around line 2076):

    if (is_post_type('wiki', $object->id)) {
          	$file = $object->file;
    } elseif ($this->getAccessHandler()->checkObjectAccess($object->type, $object->id)) {
                $file = $object->file;
    } elseif ($object->isImage) {
        		$file = UAM_REALPATH.'gfx/noAccessPic.png';
    } else {
                wp_die(TXT_UAM_NO_RIGHTS);
    }

    I didn't check whether the second hack was really necessary, but without the first, it definitely didn't work.

    Not very elegant coding, but it helps perhaps when adressing this issue in a future version. :-)

    http://wordpress.org/extend/plugins/user-access-manager/

  2. GM_Alex
    Member
    Plugin Author

    Posted 3 years ago #

    Could you please try the developer version of the plugin, should be fixed now. You will find it here: http://downloads.wordpress.org/plugin/user-access-manager.zip

  3. sfhd
    Member
    Posted 3 years ago #

    Thanks, that seems to have done the job! :-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic