Hi Darcy,
If I was to develop this for inclusion in the Arches core, I wouldn't rely
on keywords to filter out resource instances.  Instead, we currently manage
permissions on specific node groups (ie: branches) by using the
Django-Guardian module.  I suspect that you could use that same module for
managing resource instance permissions.
This would allow you to apply fine-grained permissions on resource
instances.  For example, some users could be given read-only permissions,
others full access, and still others no access at all.  This would be a
fair amount of work.  The integration points would be very similar to what
we had to do to accomplish node group level permissions.
If you do a quick search for the term "*has_perm*" within the codebase,
you'll get a general sense of all the areas we had to touch to get node
group permissions to work.

Here's a quick listing of those files:

>
> *arches/app/models/card.py*
> *arches/app/models/tile.py*
> *arches/app/utils/permission_backend.py*
> *arches/app/views/base.py*
> *arches/app/views/resource.py*
> *arches/app/views/search.py**arches/app/views/tileserver.py*


Hopefully that helps.
Cheers,
Alexei


Director of Web Development - Farallon Geographics, Inc. - 971.227.3173

On Mon, Nov 6, 2017 at 7:48 AM, Adam Cox <[email protected]> wrote:

> Hi Phil and Darcy,
>
> First, Phil, I had the exact same thought as you regarding the Permissions
> Manager, however, it does not work like that, as I detailed in this github
> issue a little while ago: #2465
> <https://github.com/archesproject/arches/issues/2465>. I later closed
> that ticket in favor of two more specific ones #2491
> <https://github.com/archesproject/arches/issues/2491> and #2492
> <https://github.com/archesproject/arches/issues/2492>, but all of the
> content of my original issue and ensuing discussion still describe the
> state of the software, as far as I am aware.
>
> Darcy, in short, v4 allows you to restrict access to certain nodes for
> certain user groups (please see the caveat I recorded in #2492
> <https://github.com/archesproject/arches/issues/2492> though), but not
> entire resource models to certain user groups (e.g. hide all Archaeological
> Sites from the public), nor specific resource instances. So there is no way
> to do exactly what you are looking for at this time, and you would need
> more than a new function to allow for it. My first thought would be to look
> at the Search view, https://github.com/archesproject/arches/blob/
> master/arches/app/views/search.py, and see if I could add some custom
> filters... That's just a start though, you should note that there are more
> than one way that the data is pulled from the db to the interface, and you
> will have to filter each one.
>
> I personally am stuck with a need to fix some very similar permissions
> needs for my current project for the Florida Public Archaeology Network,
> but have been stalled on data migration for a while now too... I will be
> sure to let you know when I am able to make some progress.
>
> Adam
>
>
>
> On Mon, Nov 6, 2017 at 5:58 AM, Darcy Christ <[email protected]> wrote:
>
>> Hi Phil,
>>
>> I think you are misunderstanding what I am saying. Arches is a database
>> that allows people to collect heritage information to share with the
>> public. It is completely reasonable to enter data and not immediately make
>> it public. Especially while developing, collaborating and validating the
>> resource. Every CMS I have worked with has this feature. I am happy to
>> develop it. All I am looking for is some help understanding Arches.
>>
>> Regards,
>> Darcy
>>
>>
>> Darcy W. Christ
>> @1000camels
>>
>> On 6 Nov 2017, at 7:16 pm, Carlisle, Philip <
>> [email protected]> wrote:
>>
>> Thanks for clarifying Darcy.
>>
>> As a publically funded body we cannot hide specific resources but we can
>> limit access to certain attributes of a resource.
>>
>>
>>
>> I think a function which allowed you to filter and hide resources
>> labelled with a specific tag should work.
>>
>>
>>
>> Regards
>>
>>
>>
>> Phil
>>
>>
>>
>>
>>
>>
>>
>> *Phil Carlisle*
>>
>> Knowledge Organization Specialist
>>
>> Listing Group, Historic England
>>
>> Direct Dial: +44 (0)1793 414824 <+44%201793%20414824>
>>
>>
>>
>> http://thesaurus.historicengland.org.uk/
>>
>> http://www.heritagedata.org/blog/
>>
>>
>>
>> Listing Information Services fosters an environment where colleagues are
>> valued for their skills and knowledge, and where communication, customer
>> focus and working in partnership are at the heart of everything we do.
>>
>>
>>
>>
>>
>> *From:* Darcy Christ [mailto:[email protected] <[email protected]>]
>>
>> *Sent:* 06 November 2017 10:53
>> *To:* Carlisle, Philip
>> *Cc:* Alexei Peters; Arches Project
>> *Subject:* Re: [Arches] Hiding certain resources
>>
>>
>>
>> I want to hide specific resources, not all of a given resource model.
>> These are heritage sites that cannot be made public yet, until there are
>> more legal protections.
>>
>>
>>
>> Darcy W. Christ
>>
>> @1000camels
>>
>>
>> On 6 Nov 2017, at 6:36 pm, Carlisle, Philip <
>> [email protected]> wrote:
>>
>> Hi both,
>>
>> I thought this was possible using the Permission Manager?
>>
>>
>>
>> If you define a user/group as Public then you can use the permission
>> manager to define No Access for each node in a resource model. For example
>> you could provide rudimentary details of a site and its type but not show
>> its geometry or location. For internal users these would be available.
>>
>>
>>
>> That’s my understanding but I may be mistaken.
>>
>>
>>
>> Phil
>>
>>
>>
>> *Phil Carlisle*
>>
>> Knowledge Organization Specialist
>>
>> Listing Group, Historic England
>>
>> Direct Dial: +44 (0)1793 414824 <+44%201793%20414824>
>>
>>
>>
>> http://thesaurus.historicengland.org.uk/
>>
>> http://www.heritagedata.org/blog/
>>
>>
>>
>> Listing Information Services fosters an environment where colleagues are
>> valued for their skills and knowledge, and where communication, customer
>> focus and working in partnership are at the heart of everything we do.
>>
>>
>>
>>
>>
>>
>>
>> <imagee07c9d.JPG> <http://www.historicengland.org.uk/>
>>
>> We help people understand, enjoy and value the historic environment, and
>> protect it for the future. Historic England <http://bit.ly/1OuxROd> is a
>> public body, and we champion everyone’s heritage, across England.
>> Follow us:  Facebook <https://www.facebook.com/HistoricEngland>  |
>> Twitter <https://twitter.com/HistoricEngland>  |  Instagram
>> <https://www.instagram.com/historicengland/>     Sign up to our
>> newsletter <http://bit.ly/1p49z1e>
>>
>> Help us create a list of the 100 places which tell England's remarkable
>> story and its impact on the world. A History of England in 100 Places
>> <https://historicengland.org.uk/100places> sponsored by Ecclesiastical.
>>
>> This e-mail (and any attachments) is confidential and may contain
>> personal views which are not the views of Historic England unless
>> specifically stated. If you have received it in error, please delete it
>> from your system and notify the sender immediately. Do not use, copy or
>> disclose the information in any way nor act in reliance on it. Any
>> information sent to Historic England may become publicly available.
>>
>>
>>
>> *From:* [email protected] [mailto:archesproject@googlegr
>> oups.com <[email protected]>] *On Behalf Of *Darcy Christ
>> *Sent:* 06 November 2017 05:49
>> *To:* Alexei Peters
>> *Cc:* Arches Project
>> *Subject:* Re: [Arches] Hiding certain resources
>>
>>
>>
>> This would be for v4.
>>
>>
>>
>> Darcy W. Christ
>>
>> @1000camels
>>
>>
>> On 6 Nov 2017, at 1:46 pm, Alexei Peters <[email protected]> wrote:
>>
>> Hi Darcy,
>>
>> First off, are you using Arches v3 or v4?
>>
>> -Alexei
>>
>>
>>
>> On Nov 4, 2017 11:01 PM, "Darcy Christ" <[email protected]> wrote:
>>
>> Hi Alexei,
>>
>>
>>
>> It’s a very important feature we need to implement. What do you think
>> about using a keyword to filter specific resources? Would you be able to
>> some guidance on where you think this filter would need to be applied? We
>> would need to make sure that not only the reports themselves would not be
>> visible, but also that it wouldn’t appear in searches or on the map. I am
>> not familiar with the code enough to know whether there is somewhere in the
>> methods that load the resources that I could apply. Filter.
>>
>>
>>
>> Darcy W. Christ
>>
>> @1000camels
>>
>>
>> On 5 Nov 2017, at 5:26 am, Alexei Peters <[email protected]> wrote:
>>
>> Hi Darcy,
>>
>> There currently isn't a way to do this, but it's a use-case that we're
>> aware of.
>>
>> -Alexei
>>
>>
>>
>>
>> Director of Web Development - Farallon Geographics, Inc. - 971.227.3173
>> <(971)%20227-3173>
>>
>>
>>
>> On Sat, Nov 4, 2017 at 12:44 AM, Darcy Christ <[email protected]>
>> wrote:
>>
>> Is there a way to hide specific resources from anonymous users?
>>
>> We are working on a project where there is a need to have some heritage
>> sites in the system not be publicly available. I can imagine some way to
>> hide resources with a given keyword. Does this makes sense? Has anyone done
>> this?
>>
>>
>>
>> Regards,
>> Darcy
>>
>> --
>> -- To post, send email to [email protected]. To
>> unsubscribe, send email to [email protected].
>> For more information, visit https://groups.google.com/d/fo
>> rum/archesproject?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Arches Project" 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.
>>
>>
>>
>> --
>> -- To post, send email to [email protected]. To
>> unsubscribe, send email to [email protected].
>> For more information, visit https://groups.google.com/d/fo
>> rum/archesproject?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Arches Project" 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.
>>
>> --
>> -- To post, send email to [email protected]. To
>> unsubscribe, send email to [email protected].
>> For more information, visit https://groups.google.com/d/fo
>> rum/archesproject?hl=en
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Arches Project" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/archesproject/04AdVLAUAjw/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.
>>
>> --
>> -- To post, send email to [email protected]. To
>> unsubscribe, send email to [email protected].
>> For more information, visit https://groups.google.com/d/fo
>> rum/archesproject?hl=en
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Arches Project" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/archesproject/04AdVLAUAjw/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.
>>
>> --
>> -- To post, send email to [email protected]. To
>> unsubscribe, send email to [email protected].
>> For more information, visit https://groups.google.com/d/fo
>> rum/archesproject?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Arches Project" 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.
>>
>
>

-- 
-- To post, send email to [email protected]. To unsubscribe, send 
email to [email protected]. For more information, 
visit https://groups.google.com/d/forum/archesproject?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Arches Project" 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