Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #10458 (closed)

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

Bug: all user-template parts need special handling

Reported by: jamoore Owned by: jamoore
Priority: blocker Milestone: 5.0.0-beta1
Component: General Version: n.a.
Keywords: n.a. Cc: fs@…, ux@…,
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: FS Demo 2

Description

Special handling was added for the first element of the user template ("%user%_%id") in order to place the directory into the user group (1) so that it's visible from all group contexts. The 1 or 2 directories which follow, however, need the same handling, otherwise it's only possible to import into a single group as a given user.

See today on gretzky. Workaround was to update all such OriginalFile objects:

omero=# select id, owner_id, group_id, path, name from originalfile where mimetype = 'Directory' and length(regexp_replace(path,'/'  id  | owner_id | group_id |        path        |   name    
------+----------+----------+--------------------+-----------
   17 |        8 |        1 | /                  | user-1_8
   18 |        8 |        1 | user-1_8/          | 2013-02
   19 |        8 |        1 | user-1_8/2013-02/  | 22
   22 |       10 |        1 | /                  | user-2_10
   23 |       10 |        1 | user-2_10/         | 2013-02
   24 |       10 |        1 | user-2_10/2013-02/ | 22
   27 |        9 |        1 | /                  | user-3_9
   28 |        9 |        1 | user-3_9/          | 2013-02
   29 |        9 |        1 | user-3_9/2013-02/  | 22
 1160 |        7 |        1 | /                  | user-6_7
 1161 |        7 |        1 | user-6_7/          | 2013-02
 1162 |        7 |        1 | user-6_7/2013-02/  | 22
 1947 |        5 |        1 | /                  | user-4_5
 1948 |        5 |        1 | user-4_5/          | 2013-02
 1949 |        5 |        1 | user-4_5/2013-02/  | 22
(15 rows)

by placing them in the user group:

omero=# update  originalfile set group_id = 1 where mimetype = 'Directory' and length(regexp_replace(path,'/','//','g')) - length(path)  <= 2;
UPDATE 15

Change History (2)

comment:1 Changed 11 years ago by jmoore

  • Remaining Time changed from 1 to 0
  • Resolution set to fixed
  • Status changed from new to closed

Pushed a fix to the recursive-delete PR (https://github.com/openmicroscopy/openmicroscopy/pull/774):

commit 17916d0bf748ea09bb798d3affa7540d6f4ece5a
Author: jmoore <josh@glencoesoftware.com>
Date:   Sun Feb 24 19:46:25 2013

    Place all template directories in user group (Fix #10458)
    
    In order for the same user to be able to access all of the
    date-based template directories from multiple groups, they
    must be placed in the user group (id=1).

comment:2 Changed 11 years ago by jmoore <josh@…>

(In [17916d0bf748ea09bb798d3affa7540d6f4ece5a/ome.git] on branch develop) Place all template directories in user group (Fix #10458)

In order for the same user to be able to access all of the
date-based template directories from multiple groups, they
must be placed in the user group (id=1).

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.70337 sec.)

We're Hiring!