question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Realm Global file stop working with Realm 3.7.2

See original GitHub issue

Hi there, I was having a global realm file that was shared among users. Users where able to shared content. However, since I updated to 3.7.2, I am not able to share content between users.

This is how user login SyncUser.loginAsync(SyncCredentials.usernamePassword(eMail, password, true), AUTH_URL, new SyncUser.Callback() {… where AUTH_URL = "http://" + BuildConfig.OBJECT_SERVER_IP + ":9080/auth";

The global file is: COMMON_REALM_URL = "realm://" + BuildConfig.OBJECT_SERVER_IP + ":9080/" + REALM_NAME;

and the configuration is:

SyncConfiguration commonRealmConfiguration = new SyncConfiguration.Builder(user, COMMON_REALM_URL).build();
Realm.setDefaultConfiguration(commonRealmConfiguration);

I adapted my code according to the documentation for Realm 3.7.2 to grant permission. When the global file is created, the admin user grant permissions to all users as follows:

private static void setPermissionsDefaultRealm(SyncUser user){
        if (user.isAdmin()){
            PermissionManager pm = user.getPermissionManager();

            UserCondition condition = UserCondition.noExistingPermissions();
            AccessLevel accessLevel = AccessLevel.WRITE;
            PermissionRequest request = new PermissionRequest(condition, COMMON_REALM_URL, accessLevel);

            pm.applyPermissions(request, new PermissionManager.ApplyPermissionsCallback() {
                @Override
                public void onSuccess() {

                }

                @Override
                public void onError(ObjectServerError error) {
                
                }
            });
        }
    }

There is not trace or error showing that something is going wrong. The problem is that when I query the file, only returns results for the logged user. I am doing something wrong?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

0reactions
beeendercommented, Oct 17, 2017

@ojarabo any updates? can we close this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Realm: Create reactive mobile apps in a fraction of the ... - MongoDB
Note: Realm does not support Java outside of Android. ... While your application continues working with a synchronized Realm as if it's a...
Read more >
REALM Global, Author at REALM
REALM ™ Global Founder and CEO Julie Faupel was honored this week as a one of the Women to Watch in 2023 by...
Read more >
Chapter 3. Configuring realms Red Hat Single Sign-On 7.6
The file must be PEM formatted. Procedure. Select the realm in the Admin Console. Click Realm settings. Click the Keys tab.
Read more >
Create reactive mobile apps in a fraction of the time - Realm
Realm data models are not allowed to extend any other object than RealmObject . RealmModel interface. An alternative to extending the RealmObject base...
Read more >
realm | FreeRADIUS Documentation - NetworkRADIUS
That is, all realms are global, no matter what is in the User-Name attribute. ... file is a local realm, then the module...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found