2012-07-01

Permission user table

User level in your program is  substantial !!. Just think if your user able to edit your site setting!! Not only that, some user have other previledges than another!

Not all user in the site only admin and visitor. We have some user that called as moderator. In my program, the program can be used by cashier, lab, nurse and doctor.

But some user have dual authorization like cashier and price moderator. This are the reason why You need user permission table. User permission table created to make dual user status.

The main problem is this table aren't secure! Since the user permission should be using only one not two or more!!

This user_permisson using 2 table that's user and permission. For the user you can see the article contain simple user table. Don't forget to check your setting!! and see the permission value is correct. If you have other idea for permission  table, can you share to us!
Table Permision table
CREATE TABLE IF NOT EXISTS `tb_userpermision` (
  `up_id` int(11) NOT NULL AUTO_INCREMENT,
  `up_user` int(11) NOT NULL,
  `up_permit` int(11) NOT NULL,
  PRIMARY KEY (`up_id`)

user_permision
CREATE TABLE IF NOT EXISTS `tb_userpermision` (
  `up_id` int(11) NOT NULL AUTO_INCREMENT,
  `up_user` int(11) NOT NULL,
  `up_permit` int(11) NOT NULL,
  PRIMARY KEY (`up_id`)
)

Tidak ada komentar: