BounceTribe / bouncetribe

The bounce tribe repository!
https://www.test.bouncetribe.com/
3 stars 2 forks source link

Load Page with Insufficient Permissions #28

Open JakeIwen opened 6 years ago

JakeIwen commented 6 years ago

For example, If I set Grqph.cool permissions to make the email field visible only to tribe members, if a non tribe member loads a page (Profile.js) that includes the User's email in the Relay query, the page will refuse to load at all.

RelayPendingQueryTracker.js:151 Server request for query `Index` failed for the following reasons:
1. Insufficient Permissions
       email,
       ^^^
JakeIwen commented 6 years ago

@carlpeaslee

carlpeaslee commented 6 years ago

So my understanding is that part of relays contract is that it is all or nothing. If it can’t load any of the data that it’s been told to load then it won’t load the page at all. On Sun, Dec 3, 2017 at 6:01 PM Jake Iwen notifications@github.com wrote:

@carlpeaslee https://github.com/carlpeaslee

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/BounceTribe/bouncetribe/issues/28#issuecomment-348831555, or mute the thread https://github.com/notifications/unsubscribe-auth/AOhs3sF2u7GuEyYtfY3q1VA81qhZNo_jks5s8zZcgaJpZM4Qz9VI .

JakeIwen commented 6 years ago

And we cant put conditionals on any logic in the relay container queries...

I wonder if some intricate prepareVariables/ filters could solve this.

Any thoughts or recommendations?

carlpeaslee commented 6 years ago

You could try some intricate prepare variables. Another option might be to conditionally choose which relay container to apply to the component. You could have different relay containers for different permission levels that get applied to the same component. On Mon, Dec 4, 2017 at 10:23 PM Jake Iwen notifications@github.com wrote:

And we cant put conditionals on any logic in the relay container queries...

I wonder if some intricate prepareVariables/ filters could solve this.

Any thoughts or recommendations?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/BounceTribe/bouncetribe/issues/28#issuecomment-349191331, or mute the thread https://github.com/notifications/unsubscribe-auth/AOhs3vtQT1C0pW9OzLQOMeZwnmzccMv9ks5s9MU8gaJpZM4Qz9VI .