-
Notifications
You must be signed in to change notification settings - Fork 13
/
README
94 lines (59 loc) · 2.81 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
------------------------------------------------------
| 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)