Allow users with ACCESS_DATABASE to get/delete external IDs of others
Change-Id: I677eeb6626e0f483109826fe3b6d5721e8508eae Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -51,7 +51,7 @@ public class GetExternalIds implements RestReadView<AccountResource> {
|
||||
@Override
|
||||
public List<AccountExternalIdInfo> apply(AccountResource resource)
|
||||
throws RestApiException, IOException, OrmException {
|
||||
if (self.get() != resource.getUser()) {
|
||||
if (self.get() != resource.getUser() && !self.get().getCapabilities().canAccessDatabase()) {
|
||||
throw new AuthException("not allowed to get external IDs");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user