You are here: custom permission system « PHP Programming Language « IT news, forums, messages
custom permission system

Posted by tranzparency@gmail.com on 10/13/06 02:09

Unfortunately my math is really rusty. We have a permission system we
are building. The permission go in value from low to high. Personal
being what you are allowed to do with your data, Group is how you can
interact with outher user's data.

Personal - View = 1
Personal - Add/Edit = 2
Personal - Delete = 4
Group - View = 8
Group - Edit = 16
Group - Delete = 32

My question is how do I create a function that I can input the
permission value in (example: 63 for full perms) and the require perm
I'm checking (example 8) have it return a true or false if 8 exists in
63?

Thanks.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация