Added simple permission checking