Register / Login  |  Desktop view  |  Jump to bottom of page

Developer Forum » Calrification about permission check in canAccess() method

Author: Mo3tazElHawary
1 decade ago
Hi,

I need a clarification about
@ net.jforum.repository.SecurityRepository
public static boolean canAccess(int userId, String roleName, String value) {
return (value != null ? pc.canAccess(roleName, value) : pc.canAccess(roleName)); <------
}
why if the (value == null ) , it calls ( pc.canAccess(roleName))
That causes a bug that if the user don't have a permission (like:perm_create_sticky_announcement_topics)on a forum (A) , but have it on another forum (B), he will get that permission on (A) too




Register / Login  |  Desktop view  |  Jump to top of page