Fixed HasPermissions.