Adding permission check for department profile pages.