You can perform some modifications to the code to turn off caching. You'll
have to do this for file-based caching and all aspects of diff generation.
Your Review Board server may become very slow if you have any real usage of
it, depending on the load, the server, and the repository's response times.
I don't recommend it, and it's not an option we'll ever include in the
product.

The correct solution is to introduce support for optional additional
methods in the SCMTools that would let the diff viewer and API say "Can
this user access this file?", separately from actually fetching the file.
This would let the caching continue to work as-is, but would restrict
access of the files at the correct moments, based on the user and HTTP
request. If designed well, I'd be okay accepting a patch for this, if you
wanted to work on one. We could discuss the design in more detail.

Christian

-- 
Christian Hammond
President/CEO of Beanbag <https://www.beanbaginc.com/>
Makers of Review Board <https://www.reviewboard.org/>

On Tue, Mar 21, 2017 at 3:53 PM, Vanaja Narayanaswamy <vanaja...@gmail.com>
wrote:

> Also,  is there a way to  turn off caching and force reviewboard  go to
> the repository every time?
>
> Thanks,
> Vanaja
>
>
> On Tue, Mar 21, 2017 at 3:44 PM, Vanaja Narayanaswamy <vanaja...@gmail.com
> > wrote:
>
>> >>Files are also not fetched by that user's account. They're fetched
>> using the credentials set up when configuring the >>repository.
>>
>> We know this. That's why we want to check the user's access first and
>> then fetch.  I thought the get_file method in myscm.py  can first do the
>> check for loggedin user's access in our scm/repo and then fetch if user has
>> access.
>>
>> >>Are your permissions set up per-file, or is it more that they can't
>> access certain hierarchies of the tree?
>> The access rule can be on a file or on  hierarchies.
>>
>> Thanks,
>> Vanaja
>>
>> On Tue, Mar 21, 2017 at 3:34 PM, Christian Hammond <chip...@chipx86.com>
>> wrote:
>>
>>> You won't be able to solve this the way you're wanting. We aggressively
>>> cache the contents from repositories, and that will happen the first time
>>> the file is requested (if not in cache), meaning that if a user has already
>>> viewed a diff or posted a change against a given file + revision, it will
>>> already be in cache and the SCMTool will not have an ability to weigh in on
>>> whether the file can be accessed.
>>>
>>> Files are also not fetched by that user's account. They're fetched using
>>> the credentials set up when configuring the repository.
>>>
>>> Are your permissions set up per-file, or is it more that they can't
>>> access certain hierarchies of the tree?
>>>
>>> Christian
>>>
>>> --
>>> Christian Hammond
>>> President/CEO of Beanbag <https://www.beanbaginc.com/>
>>> Makers of Review Board <https://www.reviewboard.org/>
>>>
>>> On Tue, Mar 21, 2017 at 3:29 PM, Vanaja Narayanaswamy <
>>> vanaja...@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> To make sure that user has read access(in our scm)  on the file that is
>>>> being diffed.
>>>>
>>>> Thanks,
>>>> Vanaja
>>>>
>>>> On Tue, Mar 21, 2017 at 1:38 PM, Christian Hammond <
>>>> christ...@beanbaginc.com> wrote:
>>>>
>>>>> Hi Vanaja,
>>>>>
>>>>> SCMTools don't have access to the current HTTP request or user, and we
>>>>> can't provide it. What do you need the user for?
>>>>>
>>>>> Christian
>>>>>
>>>>> --
>>>>> Christian Hammond
>>>>> President/CEO of Beanbag <https://www.beanbaginc.com/>
>>>>> Makers of Review Board <https://www.reviewboard.org/>
>>>>>
>>>>> On Tue, Mar 21, 2017 at 11:11 AM, Vanaja Narayanaswamy <
>>>>> vanaja...@gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> When the user is logged into the reviewboard via the browser, I would
>>>>>> like to get user info(loginId) to pass it on to my scmtool.  How do I
>>>>>> achieve that in scmtools/myscm.py module?
>>>>>>
>>>>>> Thanks,
>>>>>> Vanaja
>>>>>>
>>>>>> --
>>>>>> Supercharge your Review Board with Power Pack:
>>>>>> https://www.reviewboard.org/powerpack/
>>>>>> Want us to host Review Board for you? Check out RBCommons:
>>>>>> https://rbcommons.com/
>>>>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>>>>> ---
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "reviewboard" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to reviewboard+unsubscr...@googlegroups.com.
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>> --
>>>>> Supercharge your Review Board with Power Pack:
>>>>> https://www.reviewboard.org/powerpack/
>>>>> Want us to host Review Board for you? Check out RBCommons:
>>>>> https://rbcommons.com/
>>>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>>>> ---
>>>>> You received this message because you are subscribed to a topic in the
>>>>> Google Groups "reviewboard" group.
>>>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>>>> pic/reviewboard/UFIkl3Hxr1Y/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>> reviewboard+unsubscr...@googlegroups.com.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>> --
>>>> Supercharge your Review Board with Power Pack:
>>>> https://www.reviewboard.org/powerpack/
>>>> Want us to host Review Board for you? Check out RBCommons:
>>>> https://rbcommons.com/
>>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "reviewboard" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to reviewboard+unsubscr...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>>> Supercharge your Review Board with Power Pack:
>>> https://www.reviewboard.org/powerpack/
>>> Want us to host Review Board for you? Check out RBCommons:
>>> https://rbcommons.com/
>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "reviewboard" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>> pic/reviewboard/UFIkl3Hxr1Y/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> reviewboard+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Christian Hammond
President/CEO of Beanbag <https://www.beanbaginc.com/>
Makers of Review Board <https://www.reviewboard.org/>

On Tue, Mar 21, 2017 at 3:53 PM, Vanaja Narayanaswamy <vanaja...@gmail.com>
wrote:

> Also,  is there a way to  turn off caching and force reviewboard  go to
> the repository every time?
>
> Thanks,
> Vanaja
>
>
> On Tue, Mar 21, 2017 at 3:44 PM, Vanaja Narayanaswamy <vanaja...@gmail.com
> > wrote:
>
>> >>Files are also not fetched by that user's account. They're fetched
>> using the credentials set up when configuring the >>repository.
>>
>> We know this. That's why we want to check the user's access first and
>> then fetch.  I thought the get_file method in myscm.py  can first do the
>> check for loggedin user's access in our scm/repo and then fetch if user has
>> access.
>>
>> >>Are your permissions set up per-file, or is it more that they can't
>> access certain hierarchies of the tree?
>> The access rule can be on a file or on  hierarchies.
>>
>> Thanks,
>> Vanaja
>>
>> On Tue, Mar 21, 2017 at 3:34 PM, Christian Hammond <chip...@chipx86.com>
>> wrote:
>>
>>> You won't be able to solve this the way you're wanting. We aggressively
>>> cache the contents from repositories, and that will happen the first time
>>> the file is requested (if not in cache), meaning that if a user has already
>>> viewed a diff or posted a change against a given file + revision, it will
>>> already be in cache and the SCMTool will not have an ability to weigh in on
>>> whether the file can be accessed.
>>>
>>> Files are also not fetched by that user's account. They're fetched using
>>> the credentials set up when configuring the repository.
>>>
>>> Are your permissions set up per-file, or is it more that they can't
>>> access certain hierarchies of the tree?
>>>
>>> Christian
>>>
>>> --
>>> Christian Hammond
>>> President/CEO of Beanbag <https://www.beanbaginc.com/>
>>> Makers of Review Board <https://www.reviewboard.org/>
>>>
>>> On Tue, Mar 21, 2017 at 3:29 PM, Vanaja Narayanaswamy <
>>> vanaja...@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> To make sure that user has read access(in our scm)  on the file that is
>>>> being diffed.
>>>>
>>>> Thanks,
>>>> Vanaja
>>>>
>>>> On Tue, Mar 21, 2017 at 1:38 PM, Christian Hammond <
>>>> christ...@beanbaginc.com> wrote:
>>>>
>>>>> Hi Vanaja,
>>>>>
>>>>> SCMTools don't have access to the current HTTP request or user, and we
>>>>> can't provide it. What do you need the user for?
>>>>>
>>>>> Christian
>>>>>
>>>>> --
>>>>> Christian Hammond
>>>>> President/CEO of Beanbag <https://www.beanbaginc.com/>
>>>>> Makers of Review Board <https://www.reviewboard.org/>
>>>>>
>>>>> On Tue, Mar 21, 2017 at 11:11 AM, Vanaja Narayanaswamy <
>>>>> vanaja...@gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> When the user is logged into the reviewboard via the browser, I would
>>>>>> like to get user info(loginId) to pass it on to my scmtool.  How do I
>>>>>> achieve that in scmtools/myscm.py module?
>>>>>>
>>>>>> Thanks,
>>>>>> Vanaja
>>>>>>
>>>>>> --
>>>>>> Supercharge your Review Board with Power Pack:
>>>>>> https://www.reviewboard.org/powerpack/
>>>>>> Want us to host Review Board for you? Check out RBCommons:
>>>>>> https://rbcommons.com/
>>>>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>>>>> ---
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "reviewboard" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to reviewboard+unsubscr...@googlegroups.com.
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>> --
>>>>> Supercharge your Review Board with Power Pack:
>>>>> https://www.reviewboard.org/powerpack/
>>>>> Want us to host Review Board for you? Check out RBCommons:
>>>>> https://rbcommons.com/
>>>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>>>> ---
>>>>> You received this message because you are subscribed to a topic in the
>>>>> Google Groups "reviewboard" group.
>>>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>>>> pic/reviewboard/UFIkl3Hxr1Y/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>> reviewboard+unsubscr...@googlegroups.com.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>> --
>>>> Supercharge your Review Board with Power Pack:
>>>> https://www.reviewboard.org/powerpack/
>>>> Want us to host Review Board for you? Check out RBCommons:
>>>> https://rbcommons.com/
>>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "reviewboard" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to reviewboard+unsubscr...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>>> Supercharge your Review Board with Power Pack:
>>> https://www.reviewboard.org/powerpack/
>>> Want us to host Review Board for you? Check out RBCommons:
>>> https://rbcommons.com/
>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "reviewboard" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>> pic/reviewboard/UFIkl3Hxr1Y/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> reviewboard+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to