Allow admin user's app with system UID to access blob store.
BlobStore APIs are restricted to be only consumed by the admin user's app with system uid. Right now there is only one admin user which is user 0 and for user 0 both the appId and callingUid are same. So even with callingUid, the existing check works well. With the new headless mode, there can be several Admin users, and any Admin user's app with a system uid can call BlobStoreManager APIs. But the appId and callingUid have different values on other(except user 0) amdin users' apps. callingUid = userId + "0" + appId Refactored the restriction to use appId instead of callingUid to match with SYSTEM_UID and added an additional check to ensure that the calling user is an admin user. Removed unused callingUid param in internal method. Bug: 256119753 Test: atest --test-mapping apex/blobstore Change-Id: I6717cb8ebeb263c911e3caae924b7c3935e58778
Loading
Please register or sign in to comment