Uploaded image for project: 'Realm .NET SDK'
  1. Realm .NET SDK
  2. RNET-38

Realm.GetInstanceAsync does not return if no permission

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Major - P3 Major - P3
    • Q3-22FY
    • Affects Version/s: None
    • Component/s: None

      <!--- Questions: If you have questions about how to use Realm, please ask on -->
      <!--- StackOverflow: http://stackoverflow.com/questions/ask?tags=realm -->
      <!--- We monitor the realm tag. -->

      <!--- Feature Request: Just fill in the first two sections below. -->

      <!--- Bugs: To help you as fast as possible with an issue please describe your issue -->
      <!--- and the steps you have taken to reproduce it in as much detail as possible. -->

      <Unable to render embedded object: File (--- Thanks for helping us help you) not found. -->

      Goals

      <!--- What are you trying to achieve? -->
      get a realm instance by Realm.GetInstanceAsync

      Expected Results

      <!--- What did you expect to happen? -->
      Realm instance returned

      Actual Results

      <!--- What happened instead? -->
      <!--- e.g. the stack trace of a crash -->
      the method does not return or throw any exception

      Steps to Reproduce

      <!--- What are steps we can follow to reproduce this issue? -->

      1. Create a global realm, say /global by admin
      2. modify permission by using User.ApplyPermissionsAsync
      3. Attempt to get realm using non-admin user
        3a. Realm.GetInstanceAsync returns normally if AccessLevel.Read/Write is applied
        3b. Realm.GetInstanceAsync does not return if AccessLevel.None is applied

      Code Sample

      <!--- Please provide a code sample or test case that highlights the issue. -->
      <!--- If relevant, include your model definitions. -->
      <!--- For larger code samples, links to external gists/repositories are preferred. -->
      <!--- Alternatively, you can share information confidentially via email at help@realm.io. -->
      <Unable to render embedded object: File (--- Full projects that we can compile and run ourselves are ideal) not found. -->

      //with admin user
      var condition = PermissionCondition.UserId("*");
      var realmUrl = "https://...us1.cloud.realm.io/global";
      await user.ApplyPermissionsAsync(condition, realmUrl, AccessLevel.None);

      //with non-admin user
      var configuration = new FullSyncConfiguration(new Uri("/global", UriKind.Relative), user);
      var globalRealm = await Realm.GetInstanceAsync(configuration);

      Version of Realm and Tooling

      Realm Cloud
      Win 10
      .NET 4.7.2

            Assignee:
            ferdinando.papale@mongodb.com Ferdinando Papale
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: