Ejemplo n.º 1
0
        public virtual async Task <PermissionGrant> UpdateProviderKeyAsync(PermissionGrant permissionGrant, string providerKey)
        {
            using (CurrentTenant.Change(permissionGrant.TenantId))
            {
                //Invalidating the cache for the old key
                await Cache.RemoveAsync(
                    PermissionGrantCacheItem.CalculateCacheKey(
                        permissionGrant.Name,
                        permissionGrant.ProviderName,
                        permissionGrant.ProviderKey
                        )
                    );
            }

            permissionGrant.ProviderKey = providerKey;
            return(await PermissionGrantRepository.UpdateAsync(permissionGrant));
        }
Ejemplo n.º 2
0
 public virtual async Task <PermissionGrant> UpdateProviderKeyAsync(PermissionGrant permissionGrant, string providerKey)
 {
     permissionGrant.ProviderKey = providerKey;
     return(await PermissionGrantRepository.UpdateAsync(permissionGrant));
 }
Ejemplo n.º 3
0
 public async Task <PermissionGrant> UpdateProviderKeyAsync(PermissionGrant permissionGrant, string providerKey)
 {
     permissionGrant.ProviderKey = providerKey;
     return(await PermissionGrantRepository.UpdateAsync(permissionGrant).ConfigureAwait(false));
 }