public string GetAuthenticationScript() { var allPermission = _permissionManager.GetAllPermissionNames(); var grantedPermissions = _authorizationService.GetGrantedPermissionNames(); var script = new StringBuilder(); script.AppendLine("(function(){"); script.AppendLine(); script.AppendLine(" abp.auth = abp.auth || {};"); script.AppendLine(); AppendPermissionList(script, "allPermissions", allPermission); script.AppendLine(); AppendPermissionList(script, "grantedPermissions", grantedPermissions); script.AppendLine(); script.Append("})();"); return(script.ToString()); }