Jon W
Well-known member
Because of this line of code at the top of actionAdd in the resource controller:
	
	
	
		
it is not possible for a user to have permission to add resources to individual categories without having the global permission to add resources.
The above bit of code would be better suited here I think:
	
	
	
		
				
			
		PHP:
	
	        if (!$categoryModel->canAddResource(null, $key))
        {
            throw $this->getErrorOrNoPermissionResponseException($key);
        }The above bit of code would be better suited here I think:
		Rich (BB code):
	
	        if (!$category)
        {
            if (!$categoryModel->canAddResource(null, $key))
            {
                throw $this->getErrorOrNoPermissionResponseException($key);
            }
            $categories = $categoryModel->prepareCategories($categoryModel->getViewableCategories());
            return $this->responseView('XenResource_ViewPublic_Resource_ChooseCategory', 'resource_choose_category', array(
                'categories' =>$categories
            ));
        } 
 
		 
 
		 
 
		
 
 
		 
 
		 
 
		 
 
		