[improvement](resource-tag) limit the default user's resource tag to 'default' (#25331)
In previous, if user property `'resource_tags.location'` is not set, the can use Backends with any resource tag. It may confuse that when the DBA set part of Backends to resource group A, then the current existing user should not be able to use this group A util it's `'resource_tags.location'` is set. So in this PR, I change the behavior, that if user property `'resource_tags.location'` is not set, it can only use the Backends with `default` tag.
This commit is contained in:
@ -110,6 +110,10 @@ public class CommonUserProperties implements Writable {
|
||||
}
|
||||
|
||||
public Set<Tag> getResourceTags() {
|
||||
// If resource tags in user properties is empty, use default backend tag.
|
||||
if (resourceTags.isEmpty()) {
|
||||
return Sets.newHashSet(Tag.DEFAULT_BACKEND_TAG);
|
||||
}
|
||||
return resourceTags;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user