>>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 <[email protected]>
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 <[email protected]
> > 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 <
>> [email protected]> 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 <
>>> [email protected]> 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 [email protected].
>>>> 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
>>> [email protected].
>>> 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 [email protected].
>> 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/
> topic/reviewboard/UFIkl3Hxr1Y/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to