Method to check edit privileges
Code has been refactored