davorian / flexible-chimp

Automatically exported from code.google.com/p/flexible-chimp
0 stars 0 forks source link

Suggest a Fix - isPermPresent() function #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. If you have a user permission like "viewapp" in the metadata tag, and you 
add a 'p', "viewappp", it would still act as if the app had permission to view 
the application.  

Problem is on line 196 Chimp.as, 

if(perm != null && perm.length > 0 && allowedPerms.indexOf(perm) >= 0)
                        return true;
Since it does index the string correctly, it returns true, yet it's not a 
match.  

Easy fix, do a allowedPerms.split(/,/).indexOf(perm) and you'll get a perfect 
match or not....

Love Flex Chimp though and obviously this was a way minor fix.  

Original issue reported on code.google.com by n...@natherin.com on 27 Jan 2011 at 8:16

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Yup, I think I have the same issue, but a bit more complex. I have two 
permissions, 'bill' and 'bill_date'. If permission for 'bill' is there, states 
for the 'bill_date' is not working. 

Although, Chimp is a great tool, thanks Jon Rose!

Original comment by samahmed...@gmail.com on 3 May 2014 at 5:12