← Back to team overview

dhis2-users team mailing list archive

Re: Use of dataStore

 

Hi Victor,

that sounds good, thanks for the feedback.

No we will not introduce breaking changes here in terms of protecting
currently open namespaces.

regards,

Lars


On Tue, Jun 21, 2016 at 4:45 PM, Victor Garcia <vgarciabnz@xxxxxxxxx> wrote:

> Hi all,
>
> thank you for the clarifications. They are very helpful to figure out how
> access control is managed in dataStore resource. So just to confirm that my
> thoughts are right:
>
> - Access to reserved namespaces is only allowed to users with access to
> the corresponding app.
> - Access to non-reserved namespaces is allowed to everybody. I have
> checked this in demo server: a user with "Guest" role can create and read
> an arbitrary namespace.
>
> Is there plan to modify this behavior in the future, I mean, to protect
> non-reserved namespaces? We are about to build an app that make use of
> "public" or non-reserved namespaces, and it is important for us to know if
> the access control is going to change.
>
>



> Thanks!
>
> Víctor
>
> On 20 June 2016 at 15:02, Michael Mwebaze <michael.mwebaze@xxxxxxxxx>
> wrote:
>
>> Hi Stian,
>>
>> I wasn't able to find any documentation on specifying a namespace in the
>> manifest file. The links below were particularly helpful and I looked at
>> the java doc for AppManager api.
>>
>> https://blueprints.launchpad.net/dhis2/+spec/general-purpose-data-store
>>
>> https://code.launchpad.net/~stian-sandvold/dhis2/KeyJsonValue
>>
>> Regards,
>>
>> Michael
>>
>> On 20 June 2016 at 08:33, Stian Sandvold <stian@xxxxxxxxx> wrote:
>>
>>> Hey,
>>>
>>> seems like the documentation for specifying a namespace have
>>> disappeared, I will add it back in when I get a chance!
>>>
>>> In the mean time, it should be as simple as:
>>>
>>> “activities”: {
>>> “dhis”: {
>>> “namespace”: “my_name_space”
>>> }
>>> }
>>>
>>>
>>>
>>> I also see that there are some other discrepancies with the
>>> documentation regarding the namespaces, which I will fix:
>>>
>>>  - The name of the namespace reserved by an app does not need to be
>>> similar to the app it self.
>>> This way, different apps can share the same namespace, as long as the
>>> user has the correct access to the apps.
>>> - A namespace can only be reserved once
>>> If you are trying to share a namespace between multiple apps, only one
>>> of them can reserve it in the manifest, and users of the different apps all
>>> need to be able to use the app with the reservation.
>>>
>>>
>>> ——
>>> Stian Sandvold
>>> Software developer, DHIS 2
>>> University of Oslo
>>> http://www.dhis2.org
>>>
>>>
>>>
>>>
>>> On 20 Jun 2016, at 12:25, David Siang Fong Oh <doh@xxxxxxxxxxxxxxxx>
>>> wrote:
>>>
>>> Hi all,
>>>
>>> Is there any documentation about specifying a namespace in the manifest
>>> file? I've tried searching the DHIS2 developer manual and the W3C manifest
>>> documentation but can't find anything.
>>>
>>> Cheers,
>>>
>>> -doh
>>>
>>> On Mon, Jun 20, 2016 at 1:46 PM, Michael Mwebaze <
>>> michael.mwebaze@xxxxxxxxx> wrote:
>>>
>>>> Thanks Stian,
>>>>
>>>> I finally figured it out.
>>>>
>>>> On 20 June 2016 at 02:01, Stian Sandvold <stian@xxxxxxxxx> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> defining namespaces in the manifest file only restricts access to the
>>>>> namespace, it does not create it.
>>>>>
>>>>> The namespace will appear as soon as you add some data to it. The way
>>>>> the dataStore is designed, a namespace only exists when one or more keys
>>>>> are present in it.
>>>>>
>>>>>
>>>>> Hope this help, and let me know if you need any more help with the
>>>>> dataStore.
>>>>>
>>>>>
>>>>>
>>>>> On 20 June 2016 at 06:47, Michael Mwebaze <michael.mwebaze@xxxxxxxxx>
>>>>>  wrote:
>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> I am trying to make use of the dataStore resource for my custom app
>>>>>> but can't seem to add namespace to it. In the manifest file, I have set
>>>>>> activities.dhis.namespace property and in the tomcat logs I do see that the
>>>>>> namespace and its value is being read. However
>>>>>> http://localhost:8181/dhis/api/dataStore is still empty i.e [ ]. Has
>>>>>> anyone come across this issue? I am using DHIS 2.22 build 22027.
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Michael
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~dhis2-users
>>>>>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>>>>>> Unsubscribe : https://launchpad.net/~dhis2-users
>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>> 3
>>>>>
>>>>>
>>>>>> ——
>>>>> Stian Sandvold
>>>>> Software developer, DHIS 2
>>>>> University of Oslo
>>>>> http://www.dhis2.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~dhis2-users
>>>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~dhis2-users
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
lars@xxxxxxxxx
http://www.dhis2.org <https://www.dhis2.org/>

References