Welcome Guest, Not a member yet? Register   Sign In
searching user rights managment
#1

[eluser]taschentuch[/eluser]
hi guys im searching for a user rights managment like this:

users:
|userid|username |pass |groupid|
|1 |taschentuch |... |1 |
|2 |user2 |... |2 |

groups:
|groupid|name |can_create_news|can_delte_news|can_edit_news|
|1 |Moderator |1 |1 |0 |
|2 |SModerator|1 |1 |1 |

specrights:
|userid|can_edit_news|can_create_user|
|1 |1 |1 |
|2 |1 |1 |

specrights are additional rights which are not by groups like admin,mod,smod are defined

have someome something like this?
#2

[eluser]Ben Edmunds[/eluser]
I extended redux_auth to accomplish advanced rights similar to this. Not sure if there are any auth libraries with that included but you could always extend a current auth library with what you need.
#3

[eluser]taschentuch[/eluser]
hi, thx for you help can i have maybe your extrended version?
#4

[eluser]Ben Edmunds[/eluser]
It wouldn't do you much good as it is. It's rather specific right now but once I get around to making it into a correct library I might post it.


Thanks,
#5

[eluser]taschentuch[/eluser]
okay im waiting for it ^^ i have a user managment like this self written but not for CI

my code:

Code:
$userid = $_SESSION["uid"];
        $row = $this->db->queryobjectArray("SELECT *
                        FROM user
                        WHERE uid= $userid
                        LIMIT 1
                          ", __FILE__, __LINE__);

       $rights = $this->db->queryObjectArray("SELECT groups.* ,permission.*
                         FROM groups, permission
                         WHERE groups.gid = ".$row[0]->group." AND permission.uid = ".$row[0]->uid."
                         LIMIT 1
                        ", __FILE__, __LINE__);  
         $_SESSION[right] = $rights;

if ($_SESSION[right][0]->SEE_USERONLINE)
{
do something
} else {
do something
}




Theme © iAndrew 2016 - Forum software by © MyBB