decorator to check if the current user has priviled to access views