|
|
|
@ -35,7 +35,8 @@ namespace Volo.Abp.IdentityServer.ApiResources |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public ApiResource(Guid id, [NotNull] string name, string displayName = null, string description = null) : base(id) |
|
|
|
public ApiResource(Guid id, [NotNull] string name, string displayName = null, string description = null) |
|
|
|
: base(id) |
|
|
|
{ |
|
|
|
Check.NotNull(name, nameof(name)); |
|
|
|
|
|
|
|
@ -122,7 +123,15 @@ namespace Volo.Abp.IdentityServer.ApiResources |
|
|
|
|
|
|
|
public virtual void AddProperty([NotNull] string key, string value) |
|
|
|
{ |
|
|
|
Properties.Add(new ApiResourceProperty(Id, key, value)); |
|
|
|
var property = FindProperty(key); |
|
|
|
if (property == null) |
|
|
|
{ |
|
|
|
Properties.Add(new ApiResourceProperty(Id, key, value)); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
property.Value = value; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public virtual void RemoveAllProperties() |
|
|
|
|