Search code examples
amazon-web-servicesamazon-ec2realmrealm-object-server

Default permission says no access For realm created by admin


my Realm Object Server is in aws ec2 and whenever I create any realm through admin credentials(synced) and check the ros through IP the default permissions says no access

final SyncCredentials syncCredentials = 
SyncCredentials.usernamePassword("username","password",false);
SyncUser.loginAsync(syncCredentials, authUrl, new SyncUser.Callback() 
{
 @Override
public void onSuccess(final SyncUser user) {
SyncConfiguration config = new SyncConfiguration.Builder(user, 
serverURL)
.schemaVersion(1)/*schemaVersion(1).name("_auth")*/
.build();
realm = Realm.getInstance(config);
realm.setDefaultConfiguration(config);

enter image description here


Solution

  • This means that by default non-admin users will not be able to read or write to this Realm. If you want to grant permissions to everyone (i.e. wildcard permissions), you can do it with any of the supported SDKs. For example, if you used Swift, you could do:

    let permission = SyncPermission(realmPath: realmPath,
                                    identity: "*",
                                    accessLevel: .write)
    user.apply(permission) { error in
        // permission applied or an error occurred
    }