Location: PHPKode > scripts > Bookmarks class > RightsManagerImpl.php
<?php
/*
 * Contribution to the Booby project.
 * 
  * This file is part of the Booby project.
 * The booby project is located at the following location:
 * http://www.nauta.be/booby/
 *
 * Copyright (c) 2003 - 2004 Barry Nauta, unless stated otherwise
 *
 * The Booby project is released under the General Public License
 * More detailes in the file 'gpl.html' or on the following
 * website: http://www.gnu.org and look for licenses
 *
 * Enjoy :-)
 */
require_once ('base/RightsManager.php');
/**
 * The RightsManager implementation for this plugin.
 * Encapsulates the RightsManager class (adaptor/facade pattern)
 *
 * @author Michael Haussmann February 2004
 * @package be.nauta.booby.plugins.bookmarks
 * @copyright (c) 2004 Michael Haussmann
 *
 * The Booby project is released under the General Public License
 * More detailes on the following
 * website: <code>http://www.gnu.org</code>
 * and look for licenses
 */
class RightsManagerImpl extends RightsManager
{
	
	/**
	* "phpolymorphism" : if $item is an int, the itemId is evaluated, not the item object
	*/
	function isGranted ($item, $actionString = "")
	{
		
		switch ($actionString)
		{
			case "":
				return true;
				break;
				
			case "add":
			case "addBookmark":
			case "modifyBookmark":
				return true;
				break;
				
			case "modify":
			case "preferences":
				return true;
				break;
				
			case "search":
				return true;
				break;
			case "view":
				return true;
				break;
			case "sort":
				return true;
				break;
				
			
			default:
				return true; 
		}
	}
}
?>
Return current item: Bookmarks class