Properly implement permission management