01/04/2006 from sigurd Ness

It would be nice if documents are organized into projects - that could
be linked to both (one or the other) projects in the app 'projects' and
projects the app 'property'.

The app property is a facilities management system - and the
project-submodule would have good use for ged as a tool for coordination
/ validation and sharing of documents for house-building-projects where
many actors are involved and there is a complex structure of information
along different stages.

It would also be nice feature if involved parties (users and groups)
would get a reminder (an email and an item on an internal "todo-list" as
a part of a workflow) when new documents are added or documents are updated.

As a last feature to take over the marked from proprietary commercial
system - there would be a need for distributed print-outs - that is - to
order prints from selected documents (drawings) by listed vendors of
such services - and delivered to address of choice.
</wish-list>

As acl_location for the documents I would recommend a combination of
project_ID and folder-name.

The acl_locations goes into the table phpgw_acl_location.

There are two different aspects of the acl:
1) Give groups/users permission per locations within applications.
2) Grant other users rights related to ones (the grantor) records. These
rights can be defined with a group as the grantor (only admin-users can
do this).

Locations that are to be part of inheritance are named as:

.
.location1
.location1.sublocation1
.location1.sublocation2
.location2
.location2.sublocation1
.location2.sublocation2

The locations "run" and 'changepassword' are not listed at locations,
and are not subject to inheritance - because these locations are handled
in the user-setup.

Locations must be allowed to give grant - this is set in the
allow_grant-column in the phpgw_acl_location-table.
As an example - only the location '.user' is allowed to give grant in
the app 'hrm'.

Global categories for the application will be listed for both permission
and granting as:
$locations[$i]['id']    = 'C' . $cat['id'];
$locations[$i]['descr']    = $cat['name'];

The acl-class checks the groups-rights first - and then re-check for
user-rights

One can give a group some rights - and then mask - or give additional
rights for specified users.

In order to check if a user is allowed to add a record in
'.location1.sublocation1' at 'some_application' - one has to check for:
$GLOBALS['phpgw']->acl->check('.location1.sublocation1',
PHPGW_ACL_ADD,'some_application')
if the applicationname is not given - currentapp will be assumed.

check for grants:

in so-class:
$this->grants=$GLOBALS['phpgw']->acl->get_grants('some_application','.location1.sublocation1');

    .
    .
    .
while ($this->db->next_record())
{
    $ngrants = $this->grants[$this->db->f('account_id')];
    $account_info[] = array
    (
        'value'        => $this->db->f('value'),
        'grants'    => $ngrants
    );
}


Regards

Sigurd


30/03/2006 From Dave Hall

Hi,

Here is some initial comments:

DONE : $GLOBALS['phpgw'] -> common -> phpgw_header()
DONE : needs to be
DONE : $GLOBALS['phpgw']->common->phpgw_header(true);
DONE : should work in 16 fine like that too

DONE : $object -> method() should be $object->method(), it is easier on the
DONE : eyes and makes for smaller files.  Smaller files compile faster and so
DONE : the script runs faster  :) 

The view/download methods should use the methods in the phpgwapi.browser
class.

Check with Benoit but readfile($version['file_full_path']); I think
should really use the vfs method for returning the contents of a file.

DONE : $this->t = $GLOBALS['phpgw']->template should be a reference like so
DONE : $this->t =& $GLOBALS['phpgw']->template.  Reduces memory consumption in
DONE : php4 and works properly in php5.  
Make sure you use a $this->t->set_root
in the constructor too.  Similar thing for the db class.

The icons, cache them in an array, but only when you need them.  look at
phpgwapi.common.image too  :) 

object->css() is deprecated in head.  use templates/base/css/base.css
and prefix all classes and ids with ged_ to avoid conflicts in your css.

DONE : Header('Location: ' .
DONE : $GLOBALS['phpgw']->link('/index.php','menuaction=ged.ged_ui.browse'));
DONE : won't work in head, use
DONE : $GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' =>
DONE : 'ged.ged_ui.browse'));

DONE : Also always use arrays for the second arg for phpgwapi->link it is more
DONE : efficient.

DONE : The last 2 lines are not needed in index.php 

Sorry if this is a long list.  It is just things I found while looking
through the code quickly before and after import.  Any questions, you
know where to find me  :) 

As I said on IRC, I think it looks pretty good.  I hope to see this app
included in 18

Cheers

Dave
