Support » Plugin: User Access Manager » [Plugin: User Access Manager] Conflict with custom types?

  • 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/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: User Access Manager] Conflict with custom types?’ is closed to new replies.