You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bloodhound.apache.org by Jure Zitnik <ju...@digiverse.si> on 2013/03/29 09:26:07 UTC

[BEP-0003] Multi-product branch merge to trunk

Hi,

Given that the multi-product branch is in a stable state for some time 
now, I would merge it to trunk later today.

Any objections/concerns?

Cheers,
Jure


Re: PostgreSQL and multi-product (Was: Re: [BEP-0003] Multi-product branch merge to trunk)

Posted by Olemis Lang <ol...@gmail.com>.
On 4/5/13, Gary Martin <ga...@wandisco.com> wrote:
[...]
>
> Do we know if anyone has been looking at using MySQL with bloodhound?
>

I'm afraid I can only say «none» in my particular case . Always
PostgreSQL + SQLite .

JFYI , we have received requests for support of NoSQL DBs (MongoDB) in
a couple of occasions , but that more than homework is a huge
challenge .

-- 
Regards,

Olemis.

Re: PostgreSQL and multi-product (Was: Re: [BEP-0003] Multi-product branch merge to trunk)

Posted by Gary Martin <ga...@wandisco.com>.
On 05/04/13 20:28, Branko Čibej wrote:
> On 05.04.2013 18:03, Gary Martin wrote:
>> On 04/04/13 17:37, Olemis Lang wrote:
>>> On 4/4/13, Gary Martin <ga...@wandisco.com> wrote:
>>>> It looks like there may be a few issues that will turn up with
>>>> PostgreSQL backends with the new multi-product setup. I have already
>>>> found problems with installation that I hope I have fixed now for
>>>> https://issues.apache.org/bloodhound/ticket/497 but there are bound to
>>>> be more.
>>>>
>>> I see some test cases for  PostgreSQL ...
>>>
>>> {{{
>>> #!sh
>>>
>>> $ ls bloodhound_multiproduct/tests/db/
>>> api.py       cursor.py    __init__.py  mysql.py     postgres.py  util.py
>>>
>>> }}}
>>>
>>> ... but do not seem to fail ... o.O
>>>
>> That is not too surprising if they do not parse the sql statements to
>> determine whether quotes are for "quoted identifiers" or 'string
>> constants' - it is not completely unreasonable to call these
>> programmer errors as PostgreSQL follows the standards while SQLite
>> (and possibly MySQL?) relaxes these quoting rules. I found a
>> suggestion that it you shouldn't continue to rely on this for future
>> versions of SQLite either.
> MySQL has to be explicitly put into strict ANSI mode in order to follow
> the quoting rules. It's not by default.

Well, as long as non-strict mode doesn't do something crazy like only 
accept quoting in exactly the opposite form, then we can't go far wrong! 
These relaxed interpretations are encouraging us to be a bit too relaxed 
about getting the SQL right.

>
>> I've just found some more problems associated with the postgres
>> backend so I will be looking into this kind of thing for a bit!
> I suggest all testing should be done with at least two databases, pgsql
> being one of them; although for actual installations, of the three
> options mentioned, I'd only ever recommend PostgreSQL.
>
> -- Brane
>

Yes, I completely agree with this. I do not want to see the PostgreSQL 
support slipping.

Incidentally, if you want to run SQLite and PostgreSQL backends side by 
side from the same tracd instance then, if you already have an 
appropriate PostgreSQL user and 'bloodhound' database ready, you can do 
something like this:

    python bloodhound_setup.py -d sqlite --project=sqlite --admin-user=$ADUSER --admin-password=$ADPASS

    python bloodhound_setup.py -d postgres --project=postgres --admin-user=$ADUSER --admin-password=$ADPASS -u $PGUSER -p $PGPASS

    tracd --port=8000 bloodhound/environments/sqlite/ bloodhound/environments/postgres/

and these will then turn up at localhost:8000/sqlite/ and 
localhost:8000/postgres/. I'll try to provide more information in the 
wiki to help with a suggested dev setup soon.

Do we know if anyone has been looking at using MySQL with bloodhound?

Cheers,
     Gary

Re: PostgreSQL and multi-product (Was: Re: [BEP-0003] Multi-product branch merge to trunk)

Posted by Branko Čibej <br...@wandisco.com>.
On 05.04.2013 18:03, Gary Martin wrote:
> On 04/04/13 17:37, Olemis Lang wrote:
>> On 4/4/13, Gary Martin <ga...@wandisco.com> wrote:
>>> On 02/04/13 12:34, Jure Zitnik wrote:
>>>> On 3/29/13 11:58 AM, Gary Martin wrote:
>>>>> Yeah, looking forward to it!
>>>>>
>>>>> On 29/03/13 10:43, Andrej Golcov wrote:
>>>>>> +1 to go for it.
>>>> fyi, branch BEP-0003 (multi product) has been merged to trunk in
>>>> r1463489, reintegrated branch has been removed in r1463491.
>>>>
>>>> Cheers,
>>>> Jure
>>>>
>>>>
>>> It looks like there may be a few issues that will turn up with
>>> PostgreSQL backends with the new multi-product setup. I have already
>>> found problems with installation that I hope I have fixed now for
>>> https://issues.apache.org/bloodhound/ticket/497 but there are bound to
>>> be more.
>>>
>> I see some test cases for  PostgreSQL ...
>>
>> {{{
>> #!sh
>>
>> $ ls bloodhound_multiproduct/tests/db/
>> api.py       cursor.py    __init__.py  mysql.py     postgres.py  util.py
>>
>> }}}
>>
>> ... but do not seem to fail ... o.O
>>
>
> That is not too surprising if they do not parse the sql statements to
> determine whether quotes are for "quoted identifiers" or 'string
> constants' - it is not completely unreasonable to call these
> programmer errors as PostgreSQL follows the standards while SQLite
> (and possibly MySQL?) relaxes these quoting rules. I found a
> suggestion that it you shouldn't continue to rely on this for future
> versions of SQLite either.

MySQL has to be explicitly put into strict ANSI mode in order to follow
the quoting rules. It's not by default.

> I've just found some more problems associated with the postgres
> backend so I will be looking into this kind of thing for a bit!

I suggest all testing should be done with at least two databases, pgsql
being one of them; although for actual installations, of the three
options mentioned, I'd only ever recommend PostgreSQL.

-- Brane

-- 
Branko Čibej
Director of Subversion | WANdisco | www.wandisco.com


Re: PostgreSQL and multi-product (Was: Re: [BEP-0003] Multi-product branch merge to trunk)

Posted by Gary Martin <ga...@wandisco.com>.
On 04/04/13 17:37, Olemis Lang wrote:
> On 4/4/13, Gary Martin <ga...@wandisco.com> wrote:
>> On 02/04/13 12:34, Jure Zitnik wrote:
>>> On 3/29/13 11:58 AM, Gary Martin wrote:
>>>> Yeah, looking forward to it!
>>>>
>>>> On 29/03/13 10:43, Andrej Golcov wrote:
>>>>> +1 to go for it.
>>> fyi, branch BEP-0003 (multi product) has been merged to trunk in
>>> r1463489, reintegrated branch has been removed in r1463491.
>>>
>>> Cheers,
>>> Jure
>>>
>>>
>> It looks like there may be a few issues that will turn up with
>> PostgreSQL backends with the new multi-product setup. I have already
>> found problems with installation that I hope I have fixed now for
>> https://issues.apache.org/bloodhound/ticket/497 but there are bound to
>> be more.
>>
> I see some test cases for  PostgreSQL ...
>
> {{{
> #!sh
>
> $ ls bloodhound_multiproduct/tests/db/
> api.py       cursor.py    __init__.py  mysql.py     postgres.py  util.py
>
> }}}
>
> ... but do not seem to fail ... o.O
>

That is not too surprising if they do not parse the sql statements to 
determine whether quotes are for "quoted identifiers" or 'string 
constants' - it is not completely unreasonable to call these programmer 
errors as PostgreSQL follows the standards while SQLite (and possibly 
MySQL?) relaxes these quoting rules. I found a suggestion that it you 
shouldn't continue to rely on this for future versions of SQLite either.

I've just found some more problems associated with the postgres backend 
so I will be looking into this kind of thing for a bit!

Cheers,
     Gary

Re: PostgreSQL and multi-product (Was: Re: [BEP-0003] Multi-product branch merge to trunk)

Posted by Olemis Lang <ol...@gmail.com>.
On 4/4/13, Gary Martin <ga...@wandisco.com> wrote:
> On 02/04/13 12:34, Jure Zitnik wrote:
>> On 3/29/13 11:58 AM, Gary Martin wrote:
>>> Yeah, looking forward to it!
>>>
>>> On 29/03/13 10:43, Andrej Golcov wrote:
>>>> +1 to go for it.
>>
>> fyi, branch BEP-0003 (multi product) has been merged to trunk in
>> r1463489, reintegrated branch has been removed in r1463491.
>>
>> Cheers,
>> Jure
>>
>>
>
> It looks like there may be a few issues that will turn up with
> PostgreSQL backends with the new multi-product setup. I have already
> found problems with installation that I hope I have fixed now for
> https://issues.apache.org/bloodhound/ticket/497 but there are bound to
> be more.
>

I see some test cases for  PostgreSQL ...

{{{
#!sh

$ ls bloodhound_multiproduct/tests/db/
api.py       cursor.py    __init__.py  mysql.py     postgres.py  util.py

}}}

... but do not seem to fail ... o.O

-- 
Regards,

Olemis.

PostgreSQL and multi-product (Was: Re: [BEP-0003] Multi-product branch merge to trunk)

Posted by Gary Martin <ga...@wandisco.com>.
On 02/04/13 12:34, Jure Zitnik wrote:
> On 3/29/13 11:58 AM, Gary Martin wrote:
>> Yeah, looking forward to it!
>>
>> On 29/03/13 10:43, Andrej Golcov wrote:
>>> +1 to go for it.
>
> fyi, branch BEP-0003 (multi product) has been merged to trunk in 
> r1463489, reintegrated branch has been removed in r1463491.
>
> Cheers,
> Jure
>
>

It looks like there may be a few issues that will turn up with 
PostgreSQL backends with the new multi-product setup. I have already 
found problems with installation that I hope I have fixed now for 
https://issues.apache.org/bloodhound/ticket/497 but there are bound to 
be more.

Cheers,
     Gary

Re: [BEP-0003] Multi-product branch merge to trunk

Posted by Matevž Bradač <ma...@digiverse.si>.
On 4. Apr, 2013, at 17:30, Olemis Lang wrote:

> On 4/4/13, Matevž Bradač <ma...@digiverse.si> wrote:
>> On 4. Apr, 2013, at 2:01, Olemis Lang wrote:
> [...]
>>> 
>>> I don't think it's a good idea to set empty owner by
>>> default . If not specified explicitly it should default to
>>> req.authname ... or maybe something else ...
>>> 
>>> Of course , permissions setup for new products may be customized by
>>> implementing resource listeners . Therefore the architecture will not
>>> constrain users willing to do smething else .
>> 
>> I completely agree here. I found it strange that in the default "add
>> product"
>> form (/main/products?action=new), the owner field is not even present.
>> So I think your suggestion of using the req.authname as the owner sounds
>> good.
>> 
>> In the admin add product (/main/admin/ticket/products) the owner field is
>> present
>> however, which supports your suggestion even more. For this form I'd say
>> that at
>> least a warning should be issued if no owner is specified, and perhaps the
>> owner
>> should be set to req.authname here as well.
>> 
> 
> In product admin panel (for TRAC_ADMIN users) I do think the field
> must be required . In product scope only products owned by
> req.authname user should be listed . These may be improvements related
> to #430 afaics .
> 

+1

> [...]
>>> 
>>> Also recall that there's no such thing like permission schemes for new
>>> products . That's a TODO (see #495) .
>>> ;)
>>> 
>> 
>> Then there's also #408. =)
>> 
> 
> sorry . I closed #495 as a duplicate . I guess I searched for
> 'permission schema' instead of 'permission scheme' and got nothing
> useful :-$ . I did search
> 
> <ot>
> ... so I'm hoping the matches made by BloodhoundSearch will be a bit
> fuzzy to deal with or suggest word similarities .
> </ot>

I probably wouldn't find it either, if I weren't the submitter.
Also, +1 for fuzzy/fuzzier searches, possibly with "spelling" suggestions.
I found Peter Norvig's solution[1] to be extremely useful for most purposes,
and the implementation consists of only 21 lines of code(!)

[1] - http://norvig.com/spell-correct.html

> 
> -- 
> Regards,
> 
> Olemis.

Thanks,

--
matevz

Re: [BEP-0003] Multi-product branch merge to trunk

Posted by Olemis Lang <ol...@gmail.com>.
On 4/4/13, Matevž Bradač <ma...@digiverse.si> wrote:
> On 4. Apr, 2013, at 2:01, Olemis Lang wrote:
[...]
>>
>> I don't think it's a good idea to set empty owner by
>> default . If not specified explicitly it should default to
>> req.authname ... or maybe something else ...
>>
>> Of course , permissions setup for new products may be customized by
>> implementing resource listeners . Therefore the architecture will not
>> constrain users willing to do smething else .
>
> I completely agree here. I found it strange that in the default "add
> product"
> form (/main/products?action=new), the owner field is not even present.
> So I think your suggestion of using the req.authname as the owner sounds
> good.
>
> In the admin add product (/main/admin/ticket/products) the owner field is
> present
> however, which supports your suggestion even more. For this form I'd say
> that at
> least a warning should be issued if no owner is specified, and perhaps the
> owner
> should be set to req.authname here as well.
>

In product admin panel (for TRAC_ADMIN users) I do think the field
must be required . In product scope only products owned by
req.authname user should be listed . These may be improvements related
to #430 afaics .

[...]
>>
>> Also recall that there's no such thing like permission schemes for new
>> products . That's a TODO (see #495) .
>> ;)
>>
>
> Then there's also #408. =)
>

sorry . I closed #495 as a duplicate . I guess I searched for
'permission schema' instead of 'permission scheme' and got nothing
useful :-$ . I did search

<ot>
... so I'm hoping the matches made by BloodhoundSearch will be a bit
fuzzy to deal with or suggest word similarities .
</ot>

-- 
Regards,

Olemis.

Re: [BEP-0003] Multi-product branch merge to trunk

Posted by Matevž Bradač <ma...@digiverse.si>.
On 4. Apr, 2013, at 2:01, Olemis Lang wrote:

> On 4/3/13, Matevž Bradač <ma...@digiverse.si> wrote:
>> On 3. Apr, 2013, at 17:39, Olemis Lang wrote:
>>> On 4/3/13, Matevž Bradač <ma...@digiverse.si> wrote:
>>>> On 3. Apr, 2013, at 8:49, Olemis Lang wrote:
>>>>> On 4/2/13, Matevž Bradač <ma...@digiverse.si> wrote:
> [...]
>>>>> Is there anything else to do about this ?
>>>> 
>>>> It seems so - when creating a new product, the product is created but
>>>> cannot
>>>> be viewed due to PRODUCT_VIEW permissions missing.
>>> 
>>> You mean product owner can not access product resources ? If that's
>>> the case this is an issue (test case coming soon ;) . If this is about
>>> any other user , then there are two options :
>> 
>> Yes, that was the issue - the product was created by admin in this
>> case, and after creation the "PRODUCT_VIEW privileges are required
>> to perform this operation." error occurs.
>> 
> 
> This should be fixed (for TRAC_ADMIN users) after applying the
> patch(es) mentioned in comment:15:ticket:438 ..

Thanks for the patches, PRODUCT_XXX issue is now fixed. =)
I reran the tests and committed both t438_r1463560_product_perm_tracadmin_all.diff
and t438_r1463560_newproduct_perm.diff in r1464333.

> .
> 
> [...]
>>>> Note that this only
>>>> happens
>>>> with newly created products, the default one (@) works as it is. There
>>>> are
>>>> no
>>>> PRODUCT_XXX permissions in the permission table for either of them(which
>>>> should
>>>> be okay). I haven't found the root cause yet, still checking the code.
>>>> 
>>> 
>>> I'll write some test cases . Let's see where do we get from there
>>> ;)
>> 
>> OK, great =)
>> 
> 
> see comment:16:ticket:438
> 
>>> 
>>>> On another note, a product need not have an owner (and IIRC that's the
>>>> default
>>>> behaviour), how should the permission policy behave in that case?
>>>> 
>>> 
>>> Just like any other permissions policy . If you'd own I'm sure you'd
>>> agree with me that it'd be quite annoying if suddenly you delete your
>>> own permissions by mistake (or not) and can not access product URLs
>>> afterwards . That special case in code is aimed at
>> 
>> Sounds fine to me. I just wanted to emphasize that by default the owner
>> is empty. In that sense the "product owner cannot access the product" is
>> not the primary issue, but rather that nobody can access it (not even
>> admin).
>> 
> 
> If product owner is not set by default then TRAC_ADMIN users will have
> to setup permissions for everybody else .
> 
> Notice: based on my previous professional experience that will lead to
> some trouble between development and devops (departments ?) because
> either the later will be forced to assume this responsibility which is
> easily delegated to e.g. project team leaders or the former will end
> up having more access than tolerated in some (many) enterprise
> deployments.
> 
> IOW , this is the equivalent to :
> 
>  - All users contacting (Bitbucket | Github | ...) employees for
>    support so that repository creator (i.e. owner) will be
>    granted with permissions to manage his/her own repository.
> 
> ... etc, etc ... I don't think it's a good idea to set empty owner by
> default . If not specified explicitly it should default to
> req.authname ... or maybe something else ...
> 
> Of course , permissions setup for new products may be customized by
> implementing resource listeners . Therefore the architecture will not
> constrain users willing to do smething else .

I completely agree here. I found it strange that in the default "add product"
form (/main/products?action=new), the owner field is not even present.
So I think your suggestion of using the req.authname as the owner sounds good.

In the admin add product (/main/admin/ticket/products) the owner field is present
however, which supports your suggestion even more. For this form I'd say that at
least a warning should be issued if no owner is specified, and perhaps the owner
should be set to req.authname here as well.

> 
>>> 
>>> Not to have a product owner sounds a bit bizarre to me now. I'd
>>> suggest to require owner field in new product form , as that very same
>>> user will be responsible for managing product perms et al. at the
>>> beginning . Otherwise , if empty , (global) TRAC_ADMIN intervention
>>> will always be required . We might support both use cases by providing
>>> a bool option e.g. `require_product_owner` in `[multiproduct]` section
>>> ?
>> 
>> Well it all boils down to what a product owner should really represent.
>> Is this a product admin that can create milestones/versions etc. or
>> something else? Is the owner constrained to users with PRODUCT_ADMIN
>> rights or can it be any user? Etc etc.
>> 
> 
> The logic is all the way round . Product owner will always be a
> product admin , but the opposite will not be true . Product owner may
> be transfered to any other imaginable user and auto-magically (s)he
> will receive PRODUCT_ADMIN super-powers in product scope , regardless
> of whatever rules are stored in permissions store or decisions
> enforced by enabled perm policy components .
> 
> Along the way we'll realize that product owner will be able to perform
> actions not alloed for product admins e.g. transfer product ownership
> to other user .

Ok, this also makes sense to me.

> 
> Also recall that there's no such thing like permission schemes for new
> products . That's a TODO (see #495) .
> ;)
> 

Then there's also #408. =)

> -- 
> Regards,
> 
> Olemis.

Thanks.

--
matevz

Re: [BEP-0003] Multi-product branch merge to trunk

Posted by Olemis Lang <ol...@gmail.com>.
On 4/3/13, Matevž Bradač <ma...@digiverse.si> wrote:
> On 3. Apr, 2013, at 17:39, Olemis Lang wrote:
>> On 4/3/13, Matevž Bradač <ma...@digiverse.si> wrote:
>>> On 3. Apr, 2013, at 8:49, Olemis Lang wrote:
>>>> On 4/2/13, Matevž Bradač <ma...@digiverse.si> wrote:
[...]
>>>> Is there anything else to do about this ?
>>>
>>> It seems so - when creating a new product, the product is created but
>>> cannot
>>> be viewed due to PRODUCT_VIEW permissions missing.
>>
>> You mean product owner can not access product resources ? If that's
>> the case this is an issue (test case coming soon ;) . If this is about
>> any other user , then there are two options :
>
> Yes, that was the issue - the product was created by admin in this
> case, and after creation the "PRODUCT_VIEW privileges are required
> to perform this operation." error occurs.
>

This should be fixed (for TRAC_ADMIN users) after applying the
patch(es) mentioned in comment:15:ticket:438 ...

[...]
>>> Note that this only
>>> happens
>>> with newly created products, the default one (@) works as it is. There
>>> are
>>> no
>>> PRODUCT_XXX permissions in the permission table for either of them(which
>>> should
>>> be okay). I haven't found the root cause yet, still checking the code.
>>>
>>
>> I'll write some test cases . Let's see where do we get from there
>> ;)
>
> OK, great =)
>

see comment:16:ticket:438

>>
>>> On another note, a product need not have an owner (and IIRC that's the
>>> default
>>> behaviour), how should the permission policy behave in that case?
>>>
>>
>> Just like any other permissions policy . If you'd own I'm sure you'd
>> agree with me that it'd be quite annoying if suddenly you delete your
>> own permissions by mistake (or not) and can not access product URLs
>> afterwards . That special case in code is aimed at
>
> Sounds fine to me. I just wanted to emphasize that by default the owner
> is empty. In that sense the "product owner cannot access the product" is
> not the primary issue, but rather that nobody can access it (not even
> admin).
>

If product owner is not set by default then TRAC_ADMIN users will have
to setup permissions for everybody else .

Notice: based on my previous professional experience that will lead to
some trouble between development and devops (departments ?) because
either the later will be forced to assume this responsibility which is
easily delegated to e.g. project team leaders or the former will end
up having more access than tolerated in some (many) enterprise
deployments.

IOW , this is the equivalent to :

  - All users contacting (Bitbucket | Github | ...) employees for
    support so that repository creator (i.e. owner) will be
    granted with permissions to manage his/her own repository.

... etc, etc ... I don't think it's a good idea to set empty owner by
default . If not specified explicitly it should default to
req.authname ... or maybe something else ...

Of course , permissions setup for new products may be customized by
implementing resource listeners . Therefore the architecture will not
constrain users willing to do smething else .

>>
>> Not to have a product owner sounds a bit bizarre to me now. I'd
>> suggest to require owner field in new product form , as that very same
>> user will be responsible for managing product perms et al. at the
>> beginning . Otherwise , if empty , (global) TRAC_ADMIN intervention
>> will always be required . We might support both use cases by providing
>> a bool option e.g. `require_product_owner` in `[multiproduct]` section
>> ?
>
> Well it all boils down to what a product owner should really represent.
> Is this a product admin that can create milestones/versions etc. or
> something else? Is the owner constrained to users with PRODUCT_ADMIN
> rights or can it be any user? Etc etc.
>

The logic is all the way round . Product owner will always be a
product admin , but the opposite will not be true . Product owner may
be transfered to any other imaginable user and auto-magically (s)he
will receive PRODUCT_ADMIN super-powers in product scope , regardless
of whatever rules are stored in permissions store or decisions
enforced by enabled perm policy components .

Along the way we'll realize that product owner will be able to perform
actions not alloed for product admins e.g. transfer product ownership
to other user .

Also recall that there's no such thing like permission schemes for new
products . That's a TODO (see #495) .
;)

-- 
Regards,

Olemis.

Re: [BEP-0003] Multi-product branch merge to trunk

Posted by Matevž Bradač <ma...@digiverse.si>.
On 3. Apr, 2013, at 17:39, Olemis Lang wrote:

> On 4/3/13, Matevž Bradač <ma...@digiverse.si> wrote:
>> On 3. Apr, 2013, at 8:49, Olemis Lang wrote:
>>> On 4/2/13, Matevž Bradač <ma...@digiverse.si> wrote:
> [...]
>>>> There are also a couple of regressions wrt. the multiproduct branch,
>>>> those
>>>> should probably
>>>> be fixed first (e.g. PRODUCT_XXX permissions not set/copied when creating
>>>> a
>>>> new product).
>>>> 
>>> 
>>> The permissions policy developed in #438 will grant product owner with
>>> PRODUCT_ADMIN permission even if not assigned explicitly . Maybe there
>>> is a good reason to add that permission in product perms store too ,
>>> but not strictly necessary .
>>> 
>>> Is there anything else to do about this ?
>> 
>> It seems so - when creating a new product, the product is created but
>> cannot
>> be viewed due to PRODUCT_VIEW permissions missing.
> 
> You mean product owner can not access product resources ? If that's
> the case this is an issue (test case coming soon ;) . If this is about
> any other user , then there are two options :

Yes, that was the issue - the product was created by admin in this
case, and after creation the "PRODUCT_VIEW privileges are required
to perform this operation." error occurs. 

> 
>  1. Let product owner change it by hand since (s)he might want
>      only a few users to interact with that product.
>  2. configure product to be visible by anyone immediately
>      after creation ... and if so permissions needed to be added
>      on product resource change (create) .
> 
>> Note that this only
>> happens
>> with newly created products, the default one (@) works as it is. There are
>> no
>> PRODUCT_XXX permissions in the permission table for either of them(which
>> should
>> be okay). I haven't found the root cause yet, still checking the code.
>> 
> 
> I'll write some test cases . Let's see where do we get from there
> ;)

OK, great =)

> 
>> On another note, a product need not have an owner (and IIRC that's the
>> default
>> behaviour), how should the permission policy behave in that case?
>> 
> 
> Just like any other permissions policy . If you'd own I'm sure you'd
> agree with me that it'd be quite annoying if suddenly you delete your
> own permissions by mistake (or not) and can not access product URLs
> afterwards . That special case in code is aimed at

Sounds fine to me. I just wanted to emphasize that by default the owner
is empty. In that sense the "product owner cannot access the product" is
not the primary issue, but rather that nobody can access it (not even admin).

> 
> Not to have a product owner sounds a bit bizarre to me now. I'd
> suggest to require owner field in new product form , as that very same
> user will be responsible for managing product perms et al. at the
> beginning . Otherwise , if empty , (global) TRAC_ADMIN intervention
> will always be required . We might support both use cases by providing
> a bool option e.g. `require_product_owner` in `[multiproduct]` section
> ?

Well it all boils down to what a product owner should really represent.
Is this a product admin that can create milestones/versions etc. or
something else? Is the owner constrained to users with PRODUCT_ADMIN
rights or can it be any user? Etc etc.

> 
> -- 
> Regards,
> 
> Olemis.


Thanks,
--
matevz

Re: [BEP-0003] Multi-product branch merge to trunk

Posted by Olemis Lang <ol...@gmail.com>.
On 4/3/13, Olemis Lang <ol...@gmail.com> wrote:
[...]
>
>> On another note, a product need not have an owner (and IIRC that's the
>> default
>> behaviour), how should the permission policy behave in that case?
>>
>
> Just like any other permissions policy . If you'd own I'm sure you'd
> agree with me that it'd be quite annoying if suddenly you delete your
> own permissions by mistake (or not) and can not access product URLs
> afterwards . That special case in code is aimed at
>

This paragraph is all wrong , sorry ... This should have been

«Just like any other permissions policy . If you'd be product owner
I'm sure you'd agree with me that it'd be quite annoying if suddenly
you delete your own permissions from the store by mistake (or not) and
can not access product URLs afterwards . That special case in code is
aimed at ensuring that product owner will always act as PRODUCT_ADMIN
in the context of the target product environment, even if nothing else
will grant such permissions»

-- 
Regards,

Olemis.

Re: [BEP-0003] Multi-product branch merge to trunk

Posted by Olemis Lang <ol...@gmail.com>.
On 4/3/13, Matevž Bradač <ma...@digiverse.si> wrote:
> On 3. Apr, 2013, at 8:49, Olemis Lang wrote:
>> On 4/2/13, Matevž Bradač <ma...@digiverse.si> wrote:
[...]
>>> There are also a couple of regressions wrt. the multiproduct branch,
>>> those
>>> should probably
>>> be fixed first (e.g. PRODUCT_XXX permissions not set/copied when creating
>>> a
>>> new product).
>>>
>>
>> The permissions policy developed in #438 will grant product owner with
>> PRODUCT_ADMIN permission even if not assigned explicitly . Maybe there
>> is a good reason to add that permission in product perms store too ,
>> but not strictly necessary .
>>
>> Is there anything else to do about this ?
>
> It seems so - when creating a new product, the product is created but
> cannot
> be viewed due to PRODUCT_VIEW permissions missing.

You mean product owner can not access product resources ? If that's
the case this is an issue (test case coming soon ;) . If this is about
any other user , then there are two options :

  1. Let product owner change it by hand since (s)he might want
      only a few users to interact with that product.
  2. configure product to be visible by anyone immediately
      after creation ... and if so permissions needed to be added
      on product resource change (create) .

> Note that this only
> happens
> with newly created products, the default one (@) works as it is. There are
> no
> PRODUCT_XXX permissions in the permission table for either of them(which
> should
> be okay). I haven't found the root cause yet, still checking the code.
>

I'll write some test cases . Let's see where do we get from there
;)

> On another note, a product need not have an owner (and IIRC that's the
> default
> behaviour), how should the permission policy behave in that case?
>

Just like any other permissions policy . If you'd own I'm sure you'd
agree with me that it'd be quite annoying if suddenly you delete your
own permissions by mistake (or not) and can not access product URLs
afterwards . That special case in code is aimed at

Not to have a product owner sounds a bit bizarre to me now. I'd
suggest to require owner field in new product form , as that very same
user will be responsible for managing product perms et al. at the
beginning . Otherwise , if empty , (global) TRAC_ADMIN intervention
will always be required . We might support both use cases by providing
a bool option e.g. `require_product_owner` in `[multiproduct]` section
?

-- 
Regards,

Olemis.

Re: [BEP-0003] Multi-product branch merge to trunk

Posted by Matevž Bradač <ma...@digiverse.si>.
On 3. Apr, 2013, at 8:49, Olemis Lang wrote:

> On 4/2/13, Matevž Bradač <ma...@digiverse.si> wrote:
>> On 2. Apr, 2013, at 16:28, Gary Martin wrote:
>> 
>>> On 02/04/13 12:34, Jure Zitnik wrote:
>>>> On 3/29/13 11:58 AM, Gary Martin wrote:
>>>>> Yeah, looking forward to it!
>>>>> 
>>>>> On 29/03/13 10:43, Andrej Golcov wrote:
>>>>>> +1 to go for it.
>>>> 
>>>> fyi, branch BEP-0003 (multi product) has been merged to trunk in
>>>> r1463489, reintegrated branch has been removed in r1463491.
>>>> 
>>>> Cheers,
>>>> Jure
>>>> 
>>>> 
>>> 
>>> I am finding that I don't get tickets created properly when I try to
>>> create one with the Create Ticket dropdown from the front page (so not in
>>> default or other products). Is this expected? Once in the products/%40/
>>> area things seem to work again.
>>> 
>>> Cheers,
>>>   Gary
>> 
>> For the time being this is expected yes, some UX/UI things still have to be
>> polished, e.g.:
>> - global/product-scoped links and their behaviour (wiki, queries, ticket
>> relations)
>> - which operations should be allowed in which scope (i.e. your create ticket
>> example)
> 
> I'll try to reproduce Gary's «issue» in a test case . Will post by tomorrow .
> 
>> - some fixes to the global dashboard
>> etc.
>> 
>> There are also a couple of regressions wrt. the multiproduct branch, those
>> should probably
>> be fixed first (e.g. PRODUCT_XXX permissions not set/copied when creating a
>> new product).
>> 
> 
> The permissions policy developed in #438 will grant product owner with
> PRODUCT_ADMIN permission even if not assigned explicitly . Maybe there
> is a good reason to add that permission in product perms store too ,
> but not strictly necessary .
> 
> Is there anything else to do about this ?

It seems so - when creating a new product, the product is created but cannot
be viewed due to PRODUCT_VIEW permissions missing. Note that this only happens
with newly created products, the default one (@) works as it is. There are no
PRODUCT_XXX permissions in the permission table for either of them(which should
be okay). I haven't found the root cause yet, still checking the code.

On another note, a product need not have an owner (and IIRC that's the default
behaviour), how should the permission policy behave in that case?

--
matevz

> 
>> And last but not least, upgrading existing installations (both Trac and BH)
>> is also
>> something to be more extensively tested.
>> 
> 
> +
> 
> -- 
> Regards,
> 
> Olemis.


Re: [BEP-0003] Multi-product branch merge to trunk

Posted by Olemis Lang <ol...@gmail.com>.
On 4/2/13, Matevž Bradač <ma...@digiverse.si> wrote:
> On 2. Apr, 2013, at 16:28, Gary Martin wrote:
>
>> On 02/04/13 12:34, Jure Zitnik wrote:
>>> On 3/29/13 11:58 AM, Gary Martin wrote:
>>>> Yeah, looking forward to it!
>>>>
>>>> On 29/03/13 10:43, Andrej Golcov wrote:
>>>>> +1 to go for it.
>>>
>>> fyi, branch BEP-0003 (multi product) has been merged to trunk in
>>> r1463489, reintegrated branch has been removed in r1463491.
>>>
>>> Cheers,
>>> Jure
>>>
>>>
>>
>> I am finding that I don't get tickets created properly when I try to
>> create one with the Create Ticket dropdown from the front page (so not in
>> default or other products). Is this expected? Once in the products/%40/
>> area things seem to work again.
>>
>> Cheers,
>>    Gary
>
> For the time being this is expected yes, some UX/UI things still have to be
> polished, e.g.:
> - global/product-scoped links and their behaviour (wiki, queries, ticket
> relations)
> - which operations should be allowed in which scope (i.e. your create ticket
> example)

I'll try to reproduce Gary's «issue» in a test case . Will post by tomorrow .

> - some fixes to the global dashboard
> etc.
>
> There are also a couple of regressions wrt. the multiproduct branch, those
> should probably
> be fixed first (e.g. PRODUCT_XXX permissions not set/copied when creating a
> new product).
>

The permissions policy developed in #438 will grant product owner with
PRODUCT_ADMIN permission even if not assigned explicitly . Maybe there
is a good reason to add that permission in product perms store too ,
but not strictly necessary .

Is there anything else to do about this ?

> And last but not least, upgrading existing installations (both Trac and BH)
> is also
> something to be more extensively tested.
>

+

-- 
Regards,

Olemis.

Re: [BEP-0003] Multi-product branch merge to trunk

Posted by Matevž Bradač <ma...@digiverse.si>.
On 2. Apr, 2013, at 16:28, Gary Martin wrote:

> On 02/04/13 12:34, Jure Zitnik wrote:
>> On 3/29/13 11:58 AM, Gary Martin wrote:
>>> Yeah, looking forward to it!
>>> 
>>> On 29/03/13 10:43, Andrej Golcov wrote:
>>>> +1 to go for it.
>> 
>> fyi, branch BEP-0003 (multi product) has been merged to trunk in r1463489, reintegrated branch has been removed in r1463491.
>> 
>> Cheers,
>> Jure
>> 
>> 
> 
> I am finding that I don't get tickets created properly when I try to create one with the Create Ticket dropdown from the front page (so not in default or other products). Is this expected? Once in the products/%40/ area things seem to work again.
> 
> Cheers,
>    Gary

For the time being this is expected yes, some UX/UI things still have to be polished, e.g.:
- global/product-scoped links and their behaviour (wiki, queries, ticket relations)
- which operations should be allowed in which scope (i.e. your create ticket example)
- some fixes to the global dashboard
etc.

There are also a couple of regressions wrt. the multiproduct branch, those should probably
be fixed first (e.g. PRODUCT_XXX permissions not set/copied when creating a new product).

And last but not least, upgrading existing installations (both Trac and BH) is also
something to be more extensively tested.

--
matevz



Re: [BEP-0003] Multi-product branch merge to trunk

Posted by Gary Martin <ga...@wandisco.com>.
On 02/04/13 12:34, Jure Zitnik wrote:
> On 3/29/13 11:58 AM, Gary Martin wrote:
>> Yeah, looking forward to it!
>>
>> On 29/03/13 10:43, Andrej Golcov wrote:
>>> +1 to go for it.
>
> fyi, branch BEP-0003 (multi product) has been merged to trunk in 
> r1463489, reintegrated branch has been removed in r1463491.
>
> Cheers,
> Jure
>
>

I am finding that I don't get tickets created properly when I try to 
create one with the Create Ticket dropdown from the front page (so not 
in default or other products). Is this expected? Once in the 
products/%40/ area things seem to work again.

Cheers,
     Gary

Re: [BEP-0003] Multi-product branch merge to trunk

Posted by Matevž Bradač <ma...@digiverse.si>.
The issue seems to be resolved in r1463537, please update your working copies.

--
matevz

On 2. Apr, 2013, at 15:19, Matevž Bradač wrote:

> There seem to be some issues during installation/upgrade where setup sporadically fails.
> The cause has not yet been found, we're currently looking into it...
> 
> --
> matevz
> 
> On 2. Apr, 2013, at 13:34, Jure Zitnik wrote:
> 
>> On 3/29/13 11:58 AM, Gary Martin wrote:
>>> Yeah, looking forward to it!
>>> 
>>> On 29/03/13 10:43, Andrej Golcov wrote:
>>>> +1 to go for it.
>> 
>> fyi, branch BEP-0003 (multi product) has been merged to trunk in r1463489, reintegrated branch has been removed in r1463491.
>> 
>> Cheers,
>> Jure
>> 
>> 
> 


Re: [BEP-0003] Multi-product branch merge to trunk

Posted by Olemis Lang <ol...@gmail.com>.
On 4/2/13, Matevž Bradač <ma...@digiverse.si> wrote:
> There seem to be some issues during installation/upgrade where setup
> sporadically fails.
> The cause has not yet been found, we're currently looking into it...
>

It's possible to experience some issues with MP plugin along the way
but , In any case , considering that this will be the main target for
Release 6 , it's ok to have it in trunk .

As a side note : my main concern is that I could not find test cases
for parts of the system that may be considered critical e.g. upgrades
(<= but not limited to ...) . Therefore , as we move forward , there's
no evident way to track some regressions .

-- 
Regards,

Olemis.

Re: [BEP-0003] Multi-product branch merge to trunk

Posted by Matevž Bradač <ma...@digiverse.si>.
There seem to be some issues during installation/upgrade where setup sporadically fails.
The cause has not yet been found, we're currently looking into it...

--
matevz

On 2. Apr, 2013, at 13:34, Jure Zitnik wrote:

> On 3/29/13 11:58 AM, Gary Martin wrote:
>> Yeah, looking forward to it!
>> 
>> On 29/03/13 10:43, Andrej Golcov wrote:
>>> +1 to go for it.
> 
> fyi, branch BEP-0003 (multi product) has been merged to trunk in r1463489, reintegrated branch has been removed in r1463491.
> 
> Cheers,
> Jure
> 
> 


Re: [BEP-0003] Multi-product branch merge to trunk

Posted by Jure Zitnik <ju...@digiverse.si>.
On 3/29/13 11:58 AM, Gary Martin wrote:
> Yeah, looking forward to it!
>
> On 29/03/13 10:43, Andrej Golcov wrote:
>> +1 to go for it.

fyi, branch BEP-0003 (multi product) has been merged to trunk in 
r1463489, reintegrated branch has been removed in r1463491.

Cheers,
Jure



Re: [BEP-0003] Multi-product branch merge to trunk

Posted by Gary Martin <ga...@wandisco.com>.
Yeah, looking forward to it!

On 29/03/13 10:43, Andrej Golcov wrote:
> +1 to go for it.
>
> Cheers, Andrej
>
> On 29 March 2013 09:26, Jure Zitnik <ju...@digiverse.si> wrote:
>> Hi,
>>
>> Given that the multi-product branch is in a stable state for some time now,
>> I would merge it to trunk later today.
>>
>> Any objections/concerns?
>>
>> Cheers,
>> Jure
>>


Re: [BEP-0003] Multi-product branch merge to trunk

Posted by Andrej Golcov <an...@digiverse.si>.
+1 to go for it.

Cheers, Andrej

On 29 March 2013 09:26, Jure Zitnik <ju...@digiverse.si> wrote:
> Hi,
>
> Given that the multi-product branch is in a stable state for some time now,
> I would merge it to trunk later today.
>
> Any objections/concerns?
>
> Cheers,
> Jure
>