Skip to Content.
Sympa Menu

comanage-dev - Re: [comanage-dev] Notes on CO-172

Subject: COmanage Developers List

List archive

Re: [comanage-dev] Notes on CO-172


Chronological Thread 
  • From: Benn Oshrin <>
  • To:
  • Subject: Re: [comanage-dev] Notes on CO-172
  • Date: Wed, 07 Sep 2011 19:38:04 -0400

Also forgot to reply to list...

On 9/7/11 7:13 PM, Benn Oshrin wrote:
First, a note on commits. I tend to think in terms of one commit = one
JIRA. As such, I wouldn't commit anything until you're ready to mark
CO-172 resolved, then include a reference to [CO-172] in the commit
message and a reference to the SVN revision in the ticket.

(Relatedly, I have a bunch of uncommitted code, but I think none of it
intersects with this issue and svn should be able to handle it.)

Second, we should decide if we need an index on parent_cou_id, which we
need to do if there will be a lot of queries by parent_cou_id. I think
authz will typically be "am I an admin of this COU or a parent COU or
the parent CO?", which suggests we don't (ie: we have parent_cou_id and
are using it to retrieve other COUs via their id to walk up the graph,
not down).

-Benn-

On 9/7/11 5:45 PM, Marie Huynh wrote:
If this looks fine, I'll commit the file and move on.

[1] Update data model to add parent_cou_id column
- Update wiki

https://spaces.internet2.edu/display/COmanage/cm_cous

- Update schema.xml

<table name="cous">
<field name="id" type="I">
<key />
<autoincrement />
</field>
<field name="co_id" type="I">
<notnull />
<constraint>REFERENCES cm_cos(id)</constraint>
</field>
<field name="name" type="C" size="128" />
<field name="description" type="C" size="128" />
<field name="parent_cou_id" type="I">
<constraint>REFERENCES cm_cous(id)</constraint>
</field>
<field name="created" type="T" />
<field name="modified" type="T" />
<index name="cous_i1">
<col>co_id</col>
</index>
<index name="cous_i2">
<col>name</col>
</index>
<index name="cous_i3">
<col>co_id</col>
<col>name</col>
<unique />
</index>
</table>



[2] Update model (COU hasMany COU)
[3] Update REST API documentation
- Update wiki schema definition to allow parent_cou_id attribute
in all appropriate operations
- Update error codes for scenarios described in [4], below
[4] Update controller
- Add a write check that the parent cou is a member of the
same co as the target cou
- Add a delete check that a cou can't be deleted if it has
children
[5] Update web UI to allow Parent COU ID to be set as part of
editing a COU (probably via a drop-down)
[6] Update isAuthorized in all appropriate controllers (ie: anything
that currently allows authorization based on COU Admin status)
to properly account for child COUs in decision making. (This
probably just needs to be done in CalculateCMRoles.)

-Benn-






Archive powered by MHonArc 2.6.16.

Top of Page