Show DevBest PHP Permissions System

Status
Not open for further replies.

Jian

Resident Weeb
Contributor
Sep 2, 2011
687
437
I've made a permissions system (Like the ones in Bukkit/Java) with what knowledge I have in PHP. So it's a half-ass code here. But it does the trick. I have no time to test it yet, so hopefully it will work. I'll put this up on Github later on with documentations and examples.

In the meantime, here is the current source code ( )
Or Hydr Snip ID 50c60d92a2e03.
If you have found any bugs or have any suggestions, please post it below :)
 

Ecko

23:37 [autobots] -!- eckostylez [[email protected]]
Nov 25, 2012
1,397
961
Not bad, but I don't see why you are storing permissions in cookies instead of making permissions based off access levels and storing it in a database. Session hijacking is a lot easier than finding an exploit and injecting SQL. Not saying the code you posted is insecure or anything.
 

Jian

Resident Weeb
Contributor
Sep 2, 2011
687
437
Not bad, but I don't see why you are storing permissions in cookies instead of making permissions based off access levels and storing it in a database. Session hijacking is a lot easier than finding an exploit and injecting SQL. Not saying the code you posted is insecure or anything.
well, this is just an example. You can replace sessions with SQL queries and store them in any way possible. This is just a starting point.
 

Ecko

23:37 [autobots] -!- eckostylez [[email protected]]
Nov 25, 2012
1,397
961
well, this is just an example. You can replace sessions with SQL queries and store them in any way possible. This is just a starting point.
I do like the OOP approach with it. Since this will obviously have some type of implementation with it, may I ask if you are going to change those variables from private to protected?
 

Jian

Resident Weeb
Contributor
Sep 2, 2011
687
437
I do like the OOP approach with it. Since this will obviously have some type of implementation with it, may I ask if you are going to change those variables from private to protected?
Well, I would if I continue to develop on it. But I would like it to be able to be extended to another class as well. Like customisation. So it will be a hard thing to do. And I'll try.
 
Status
Not open for further replies.

Users who are viewing this thread

Top