WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Access Manager
"Unauthorized Action" when "Go to next page" in All Posts (6 posts)

  1. spabav
    Member
    Posted 1 year ago #

    Hello,

    AAM is giving me a hard time with a simple browsing issue.
    I set capabilities to "edit posts" for a certain user group.

    If the user logs in the wp Admin area - goes to ALL POSTS screen - he sees all his post and can perfectly edit them.
    However if the list shows e.g. 10 posts and he simply wants to click on the arrow "Go to next page" (top-right) on the "All Posts" window, he gets an "Unauthorized Action" note.

    He can not browse through the next page in the "all posts" window.

    At the moment I found a workaround in showing 999 posts via the "screen options", but that does really not solve the problem.

    Could you please tell me what Capabilities I need to assign to this User Group to make users browse to the next page in the "All Posts" admin window?

    Thanks for your help in advance.

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

  2. dasBIOS
    Member
    Posted 1 year ago #

  3. Adam
    Member
    Posted 1 year ago #

    I'm also having the exact same issue... not able to view pages past page 1 in the admin. Thanks, spabav, for your detailed description.

  4. bjonesilg
    Member
    Posted 12 months ago #

    Also having this same issue, please can this be resolved asap

  5. GuTheR
    Member
    Posted 8 months ago #

    Abra o arquivo filtermenu.php, que está dentro do diretório model.

    Neste arquivo, altere a função get_parts() para esta abaixo:

    function get_parts($requestedMenu) {
    
            //this is for only one case - edit.php
            if (in_array(basename($requestedMenu), array('edit.php', 'post-new.php'))) {
                $requestedMenu .= '?post_type=post';
            } elseif (basename($requestedMenu) == 'edit-tags.php') {
                $requestedMenu .= '?taxonomy=' . $_REQUEST['taxonomy'];
            }
    
            //splite requested URI
            $parts = preg_split('/\?/', $requestedMenu);
            $result = array(basename($parts[0]));
    
            if (count($parts) > 1) { //no parameters
                $params = preg_split('/&|&/', $parts[1]);
                $result = array_merge($result, $params);
            }
    
    		if(in_array("edit.php",$result)){
    			$tem_post_type = false;
    			$pt = "post_type=";
    			foreach($result as $v){
    				if(substr_count($v,$pt)>0){
    					$tem_post_type = true;
    					break;
    				}
    			}
    			if(!$tem_post_type)
    				$result[] = "{$pt}post"	;
    		}			
    
            return $result;
        }
  6. WP AAM
    Member
    Plugin Author

    Posted 8 months ago #

    Hi GuTheR,
    Thanks for post. New release 2.0 has implemented completely different way of access control. This time it is based on capabilities. So no more issues like that.
    You can follow me on twitter to now the latest updates.

    Thanks and Regards,
    Vasyl

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.