Oxymoron290 Posted October 20, 2012 Report Posted October 20, 2012 Okay so I've been playing around with the group permissions and trying to add in a few custom permissions of my own, And then I stumbled across something in the logic that had me stumped. So in a few moments I will ask the question but before I would like to explain how I'm understanding this to make sure I have it down right. If the following paragraph sounds too confusing just ignore it, It's still kinda hard for me to explain. Basically what I can get from this is that each permission is represented in binary format and it starts at 1 then 10, then 100, then 1000. and you just check to see if that bit is on when checking for a permission. for example if I'm wanting to check if a user has permission 1 (By defualt this is EDIT_NEWS) and permission 4 (By default this is EMAIL_PILOTS) I would check to see if they have their permission value evaluates to 1001 Now I know this is all done for me in PilotGroups so there isn't much that I need to do in evaluating, just call the functions in that class. However this is the problem I'm having, I've noticed that between permissions 6 (EDIT_FLEET) and 7(EDIT_SCHEDUALS) there is a bit missing, it skips stright from 0x20 to 0x80, completely skipping 0x40? Is there a reason for this? I mean I'm sure if I were to add in a permission with the value of 0x40 and edit the FULL_ADMIN variable to have 35651583 instead of 35651519 then it should work just fine right? Or was there a reason for leaving out that bit? Quote
Oxymoron290 Posted October 21, 2012 Author Report Posted October 21, 2012 Got it all figured out: https://github.com/nshahzad/phpVMS/issues/80 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.