Giter Site home page Giter Site logo

spark_plug's Introduction

 ------------------------------------------------------
| SparkPlug is a simple auth-acl plugin for cakephp1.3 |
 ------------------------------------------------------

Default user created = admin
Default password = 1234
 
INSTALLATION
------------

1. Download the latest version or use git to keep the plugin up to date

	cd yourapp/app/plugins
	git clone git://github.com/jedt/spark_plug.git  

2. Schema import (use your favorite sql tool to import the schema)

	/app/plugins/spark_plug/config/schema/spark_plug.sql

3. Import config files

	3.1 open /app/config/core.php and paste on the last line
	
		include_once(ROOT.'/app/plugins/spark_plug/config/config.php');
		
	3.2 open /app/config/routes.php and paste on the last line
		
		include_once(ROOT.'/app/plugins/spark_plug/config/routes.php');
		
4. Include callback in your AppController class

	open or create the file /app/app_controller.php and paste or edit the file. It should look like this 
	
	<?php
		class AppController extends Controller {
			var $components = array ('Session','SparkPlug.Authsome' => 
				array('model' => 'User'));
        	var $uses = array('SparkPlug.UserGroup');
	
			function beforeFilter()
			{
	    		parent::beforeFilter();
            	SparkPlugIt($this);
			}
		}
	?>

5. Adjust plugin configuration

	Change /app/plugins/spark_plug/config/config.php (parameters are explained there) to suit your needs.
	
6. {OPTIONAL} Do you want your permission rules filtered ?

	cd yourapp/app/plugins
	git clone http://github.com/josegonzalez/cakephp-filter-plugin.git filter
	
	then modify in your app_controller components variable this line
	
	var $components = array ('Session', 'Filter.Filter', 'SparkPlug.Authsome' => 
				array('model' => 'User'));  

	(note 'Filter.Filter' component added)

7. {OPTIONAL} Do you want facebook users to access your app ?

	cd yourapp/app/plugins
	git clone http://github.com/webtechnick/CakePHP-Facebook-Plugin.git facebook
	
	then modify in your app_controller components variable this line
	
	var $components = array ('Session', 'Facebook.Connect', 'SparkPlug.Authsome' => 
				array('model' => 'User'));  

	(note 'Facebook.Connect' component added)
	
	then copy the file
	yourapp/app/plugins/facebook/facebook.php.example into yourapp/config/facebook.php
	
	then edit file yourapp/config/facebook.php
	and put your facebook app keys
	
	Yes, you have to login previously to your facebook account and then create a new application, using fb developers api 
	You will first need to update your facebook application with the connect url of your application's url.  This is done on 
	the facebook application settings. http://www.facebook.com/developers/apps.php) 

ROADMAP
-------



TODO
----

please check github page (github.com/jedt/spark_plug.git) 

spark_plug's People

Contributors

tylerdigital avatar steinkel avatar jedt avatar tdariane avatar aquive avatar dustinchilson avatar

Stargazers

Andrew Reed avatar

Watchers

James Cloos avatar Andrew Reed avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.