Re: [Arches] Hiding certain resources

2020-05-04 Thread Mike Arrowsmith
Hi

I appreciate this thread is quite old now and relates to a previous version 
of Arches but I'd be interested to know whether anyone managed to implement 
this.

Our dataset also has a number of resources that are not intended for public 
view - this is controlled by a boolean node.

It was also touched upon in this thread where it seemed possible to do this 
with custom search filters in Arches 5:

https://groups.google.com/forum/#!topic/archesproject/Y1j3tph91-I

Has this feature been documented yet, or is there anything else in the 
roadmap that might allow for this in future?

Mike

On Monday, 6 November 2017 18:31:19 UTC, Alexei Peters wrote:
>
> 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 > 
> 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 
>> . I later closed 
>> that ticket in favor of two more specific ones #2491 
>>  and #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 
>>  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 > > 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 <
>>> philip@historicengland.org.uk > 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 

Re: [Arches] Hiding certain resources

2020-05-04 Thread Dennis Wuthrich
Hi Mike,

I'm not sure if this answers your question, but we're implementing instance 
permissions in v5.1.  

Instance permissions allow you to define access (No Access, Read, Create, 
Update, Delete) on model instances for groups or individual accounts.  For 
example: imagine setting "No Access" to an instance (say for the Historic 
Buildings model)  for the guest user group.   This would mean that members 
of the guest group could access all instances of the Historic Buildings 
model with their default privileges, except for the specific instance that 
you configured with No Access.

Hope that helps,

Dennis

On Monday, May 4, 2020 at 2:38:19 AM UTC-7, Mike Arrowsmith wrote:
>
> Hi
>
> I appreciate this thread is quite old now and relates to a previous 
> version of Arches but I'd be interested to know whether anyone managed to 
> implement this.
>
> Our dataset also has a number of resources that are not intended for 
> public view - this is controlled by a boolean node.
>
> It was also touched upon in this thread where it seemed possible to do 
> this with custom search filters in Arches 5:
>
> https://groups.google.com/forum/#!topic/archesproject/Y1j3tph91-I
>
> Has this feature been documented yet, or is there anything else in the 
> roadmap that might allow for this in future?
>
> Mike
>
> On Monday, 6 November 2017 18:31:19 UTC, Alexei Peters wrote:
>>
>> 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  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 
>>> . I later closed 
>>> that ticket in favor of two more specific ones #2491 
>>>  and #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 
>>>  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  
>>> 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 

Re: [Arches] Hiding certain resources

2020-05-04 Thread Cyrus Hiatt
Hi Mike,

We are currently in the process of implementing this feature. It will be
available in Arches 5.1.

Cheers,

Cyrus

On Mon, May 4, 2020 at 2:38 AM Mike Arrowsmith  wrote:

> Hi
>
> I appreciate this thread is quite old now and relates to a previous
> version of Arches but I'd be interested to know whether anyone managed to
> implement this.
>
> Our dataset also has a number of resources that are not intended for
> public view - this is controlled by a boolean node.
>
> It was also touched upon in this thread where it seemed possible to do
> this with custom search filters in Arches 5:
>
> https://groups.google.com/forum/#!topic/archesproject/Y1j3tph91-I
>
> Has this feature been documented yet, or is there anything else in the
> roadmap that might allow for this in future?
>
> Mike
>
> On Monday, 6 November 2017 18:31:19 UTC, Alexei Peters wrote:
>>
>> 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  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
>>> . I later closed
>>> that ticket in favor of two more specific ones #2491
>>>  and #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
>>>  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 
>>> 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 <
 philip@historicengland.org.uk> 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 

[Arches] No module named arches

2020-05-04 Thread Martha S
I need help with a headscratcher here, please. My 4.4.2 version of Arches 
was fine until I attempted to use ufw to make some port changes. This, 
apparently started some processes that interfered with arches loading. The 
message in the Apache log was that the import arches statement in 
settings.py failed with "No module named arches."

As I was unable to reverse this problem, I got a system restore to before 
my ufw effort, but the problem persists. I assumed that perhaps the daemon 
wasn't being started for some reason, but 

ps -ef | grep arches returned 

 63787  41196  0 22:56 pts/000:00:00 grep --color=auto arches

All seems to be well, by which I mean that the 000-default.conf hasn't been 
changed, settings.py hasn't been changed, the ElasticSearch nodes are 
running properly, and the database is accessible on 5432. 

Here is the whole error returned when I try to run the development server: 
python manage.py runserver:8000
Traceback (most recent call last):
  File "manage.py", line 29, in 
execute_from_command_line(sys.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 364, in execute_from_command_line
utility.execute()
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 308, in execute
settings.INSTALLED_APPS
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", 
line 56, in __getattr__
self._setup(name)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", 
line 41, in _setup
self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", 
line 110, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
  File "/Projects/prod/hpla/hpla/settings.py", line 6, in 
import arches
ImportError: No module named arches

Any ideas on how to troubleshoot this?

Thanks,
Martha

-- 
-- To post, send email to archesproject@googlegroups.com. To unsubscribe, send 
email to archesproject+unsubscr...@googlegroups.com. 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 archesproject+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/archesproject/0d545c0d-0486-4c2e-b65d-fb7edb938ba1%40googlegroups.com.


Re: [Arches] Re: Adding features to mapbox (scale bar)

2020-05-04 Thread Mahmoud Abdelrazek
Hi Cyrus,

Thank you so much for your help. I did clear the cache but unfortunately, 
it didn't help. 

The edit is mainly on core arches then carried out to the project through 
*collectstatic 
*command. I did trace it and found the same edit in the project files 
after. 

Thank you again, 
Best regards, 
Mahmoud 

On Sunday, May 3, 2020 at 6:07:30 PM UTC+2, Cyrus Hiatt wrote:
>
> Hi Mahmoud - 
>
> You've probably already tried clearing you browser's cache, but in case 
> you haven't that might be worth trying.
>
> If that doesn't help, I'm curious whether you edited the file in core 
> arches, or if you are overriding the file from within your project?
>
> Kind regards,
>
> - Cyrus
>
>
>
> On Wed, Apr 29, 2020 at 3:30 AM Mahmoud Abdelrazek  > wrote:
>
>> Hi Reuben, 
>>
>> Than you very much for your help. 
>> I performed the static files update and restarted the server. Django 
>> copied the js file to the static directory. I checked the static directory 
>> and confirmed that the js file was replaced. However, the scale bar still 
>> didn't show up on the map.
>> Any thoughts on why that might be? 
>>
>> Thank you again for your help, 
>> Mahmoud 
>>
>> On Wednesday, April 29, 2020 at 11:14:56 AM UTC+2, Mahmoud Abdelrazek 
>> wrote:
>>>
>>> Hi Reuben, 
>>>
>>> Thank you for your help. I have not tried to restart the server nor to 
>>> update the static files. I will try this and report back here. 
>>>
>>> Thank you again,
>>> Mahmoud 
>>>
>>> On Wednesday, April 29, 2020 at 10:00:23 AM UTC+2, Reuben Osborne wrote:

 Hi Mahmoud,

 Have you tried updating the static files on the server? *python 
 manage.py collectstatic* and  then *sudo service apache2 restart *to 
 make sure the changes are being picked up.

 Reuben


 On Wednesday, 29 April 2020 08:47:32 UTC+1, Mahmoud Abdelrazek wrote:
>
> Hi, 
>
> I am trying to add a scale bar to the main map in the search window. I 
> think the map is generated from the file *mapbox-gl.js *in the 
> following directory 
> *Lib\site-packages\arches\app\media\js\bindings\mapbox-gl.js 
> *inside the environment. To add a scale bar I added the following 
> line after the map variable is created 
>
> map.addControl(new mapboxgl.ScaleControl(), 'bottom-right');
>
> I tested the code on a local implementation on my computer and it did 
> work fine. I could see the scale bar on the map as ib the included 
> screenshot. However, when applying the same code to an online live 
> server, 
> the map didn't update to include the scale bar. I am not sure why is 
> happening. Am I missing something? 
>
> [image: scale_bar_arches.jpg]
>
>
>
>
>
>
>
>
>
>
>
>
>
> Thank you for your help.
> Mahmoud 
>
 -- 
>> -- To post, send email to arches...@googlegroups.com . To 
>> unsubscribe, send email to arches...@googlegroups.com . 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 arches...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/archesproject/5fb03288-5509-41a3-b572-1293c79d2c9f%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
-- To post, send email to archesproject@googlegroups.com. To unsubscribe, send 
email to archesproject+unsubscr...@googlegroups.com. 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 archesproject+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/archesproject/050ea72f-98f5-45c4-af0a-b8ff4841b45a%40googlegroups.com.