Changeset 5368


Ignore:
Timestamp:
Jun 22, 2010, 2:51:41 PM (13 years ago)
Author:
Nicklas Nordborg
Message:

References #1459: Named permissions keys that store predefined permissions for projects/groups/users

Added data, core and test classes. Updated data-layer documentation. Implemented the third use case in the ticket description at the core level (A project can be linked with a permission key...).

Location:
trunk
Files:
3 added
24 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/src/docbook/developerdoc/api_overview.xml

    r5100 r5368  
    471471
    472472      <sect3 id="data_api.authentication.groups">
    473         <title>Groups, roles and projects</title>     
     473        <title>Groups, roles, projects and permission template</title>     
    474474     
    475475        <para>
     
    481481          project. No matter what permission an item has been shared with the
    482482          user will not get higher permission. Groups may be members of other groups and
    483           also in projects.
     483          also in projects. A <classname docapi="net.sf.basedb.core.data">PermissionTemplateData</classname>
     484          is just a holder for permissions that users can use when sharing items. The
     485          template is never part of the actual permission control mechanism.
    484486        </para>
    485487       
     
    488490          one project at a time to be use, this is the <emphasis>active project</emphasis>.
    489491          When a project is active new items that are created are automatically
    490           added to that project with the permission given by the
    491           <varname>autoPermission</varname> property.
    492         </para>
    493              
     492          shared according to the settings for the project. There are two cases.
     493          If the project has a permission template, the new item is given the same
     494          permissions as the template has. If the project doesn't have a permission
     495          template, the new item is shared to the active project with the permission
     496          given by the <varname>autoPermission</varname> property. Note that in the
     497          first case the new item may or may not be shared to the active project
     498          depending on if the template is shared to the project or not.
     499        </para>
     500       
     501        <para>
     502          Note that the permission template is only used (by the core) when creating
     503          new items. The permissions held by the template are copied and when the new item
     504          has been saved to the database there is no longer any reference back to
     505          the template that was used to create it. This means that changes to the
     506          template does not affect already existing items and that the template
     507          can be deleted without problems.
     508        </para>
    494509      </sect3>
    495510     
  • trunk/src/clients/web/net/sf/basedb/clients/web/PermissionUtil.java

    r5360 r5368  
    217217            Item.FILESERVER, Item.FILE, Item.DIRECTORY, Item.PROJECT, Item.MESSAGE,
    218218            Item.PLUGINTYPE, Item.PLUGINDEFINITION, Item.PLUGINCONFIGURATION, Item.JOB,
    219             Item.JOBAGENT, Item.CHANGEHISTORY
     219            Item.JOBAGENT, Item.CHANGEHISTORY, Item.PERMISSIONTEMPLATE
    220220          })
    221221        );
  • trunk/src/core/common-queries.xml

    r5360 r5368  
    38373837    </description>
    38383838  </query>
     3839  <query id="GET_PROJECTS_FOR_PERMISSION_TEMPLATE" type="HQL">
     3840    <sql>
     3841      SELECT {1}
     3842      FROM ProjectData prj
     3843      WHERE prj.permissionTemplate = :permissionTemplate
     3844    </sql>
     3845    <description>
     3846      A HQL query that gets the projects that are using a given permission
     3847      template.
     3848    </description>
     3849  </query>
    38393850
    38403851</predefined-queries>
  • trunk/src/core/net/sf/basedb/core/GroupPermissions.java

    r4889 r5368  
    7979
    8080  /**
     81    Merge the permissions for all groups from the given item key with the permissions
     82    in this object. If the item key contains permissions for a group that already
     83    has permissions in this object the permissions are combined (added) to create
     84    a new permission.
     85   
     86    @param itemKey An item key (if null, this method simply returns)
     87    @since 2.16
     88  */
     89  public void merge(ItemKey itemKey)
     90  {
     91    if (itemKey == null) return;
     92    for (Map.Entry<GroupData, Integer> entry : itemKey.getData().getGroups().entrySet())
     93    {
     94      GroupData group = entry.getKey();
     95      int permissions = IntegerUtil.getInt(entry.getValue());
     96      int current = IntegerUtil.getInt(groupPermissions.get(group));
     97      groupPermissions.put(group, current | permissions);
     98    }
     99  }
     100
     101 
     102  /**
    81103    Grant permissions to a group. Use an empty <code>Set</code> or null
    82104    to remove all permissions for the group.
  • trunk/src/core/net/sf/basedb/core/Install.java

    r5364 r5368  
    116116    method.
    117117  */
    118   public static final int NEW_SCHEMA_VERSION = Integer.valueOf(81).intValue();
     118  public static final int NEW_SCHEMA_VERSION = Integer.valueOf(82).intValue();
    119119 
    120120  public static synchronized void createTables(boolean update, final ProgressReporter progress)
     
    329329      createRoleKey(Item.USER, "Users", "Gives access to users.", administrators_all);
    330330      createRoleKey(Item.PROJECT, "Projects", "Gives access to projects.", users_create);
     331      createRoleKey(Item.PERMISSIONTEMPLATE, "Permission templates", "Gives access to permission templates.", users_create);
    331332 
    332333      // Files, directories and quota
  • trunk/src/core/net/sf/basedb/core/Item.java

    r5360 r5368  
    7777  */
    7878  ITEMKEY(25, "Item key", "ik", ItemKey.class, ItemKeyData.class, null,
    79     1300),
     79    1310),
    8080  /**
    8181    The item is a {@link ProjectKey}.
    8282  */
    8383  PROJECTKEY(26, "Project key", "pk", ProjectKey.class, ProjectKeyData.class, null,
    84     1310),
     84    1320),
    8585  /**
    8686    The item is a {@link RoleKey}.
    8787  */
    8888  ROLEKEY(27, "Role key", "rk", RoleKey.class, RoleKeyData.class, null,
    89     1320),
     89    1330),
     90  /**
     91    The item is a {@link PermissionTemplate}.
     92  */
     93  PERMISSIONTEMPLATE(28, "Permission template", "pt", PermissionTemplate.class, PermissionTemplateData.class,
     94    DefinedPermissions.shareable, 1300),
     95 
    9096
    9197  /**
  • trunk/src/core/net/sf/basedb/core/Project.java

    r5167 r5368  
    288288    The permissions to use when automatically sharing new items to
    289289    the project when it is the active project. The default is READ,
    290     USE, WRITE and DELETE.
     290    USE, WRITE and DELETE. Note that this setting is ignored when
     291    a permission template is used ({@link #getPermissionTemplate()}).
    291292    @since 2.10
    292293  */
     
    298299  /**
    299300    Set the default permissions to use when automatically sharing
    300     new item the project when it is the active project.
     301    new item the project when it is the active project. Note that
     302    this setting is ignored when a permission template is used
     303    ({@link #getPermissionTemplate()}).
    301304    @param permissions The permissions, must not be null or empty
    302305    @throws PermissionDeniedException If the logged in user doesn't
     
    316319  }
    317320
     321  /**
     322    Get the permission template that is used to share new items when this project
     323    is active. Note that if a permission template is used the new items are only
     324    shared to the active project if the project is part of the template.
     325    @return A permission template or null if no template has been specified
     326    @since 2.16
     327  */
     328  public PermissionTemplate getPermissionTemplate()
     329  {
     330    return getDbControl().getItem(PermissionTemplate.class, getData().getPermissionTemplate());
     331  }
     332 
     333  /**
     334    Set the permission template that should be used to share new items when
     335    this project is active.
     336    @param template A permission template, or null to not use any template
     337    @since 2.16
     338  */
     339  public void setPermissionTemplate(PermissionTemplate template)
     340  {
     341    checkPermission(Permission.WRITE);
     342    getData().setPermissionTemplate(template == null ? null : template.getData());
     343  }
     344 
    318345  /**
    319346    Grant a user permissions to this project. Use an empty <code>Set</code> or null
  • trunk/src/core/net/sf/basedb/core/ProjectPermissions.java

    r4889 r5368  
    8181 
    8282  /**
     83    Merge the permissions for all projects from the given project key with the permissions
     84    in this object. If the project key contains permissions for a project that already
     85    has permissions in this object the permissions are combined (added) to create
     86    a new permission.
     87   
     88    @param projectKey A project key (if null, this method simply returns)
     89    @since 2.16
     90  */
     91  public void merge(ProjectKey projectKey)
     92  {
     93    if (projectKey == null) return;
     94    for (Map.Entry<ProjectData, Integer> entry : projectKey.getData().getProjects().entrySet())
     95    {
     96      ProjectData project = entry.getKey();
     97      int permissions = IntegerUtil.getInt(entry.getValue());
     98      int current = IntegerUtil.getInt(projectPermissions.get(project));
     99      projectPermissions.put(project, current | permissions);
     100    }
     101  }
     102
     103 
     104  /**
    83105    Grant permissions to a project. Use an empty <code>Set</code> or null
    84106    to remove all permissions for the project.
  • trunk/src/core/net/sf/basedb/core/SessionControl.java

    r5319 r5368  
    2525
    2626import net.sf.basedb.core.data.OwnableData;
     27import net.sf.basedb.core.data.PermissionTemplateData;
    2728import net.sf.basedb.core.data.UserData;
    2829import net.sf.basedb.core.data.PasswordData;
     
    897898        loginInfo.activeProjectId = 0;
    898899        loginInfo.projectKeyId = 0;
     900        loginInfo.itemKeyId = 0;
    899901      }
    900902      else
     
    905907        if (project.hasPermission(Permission.USE))
    906908        {
    907           ProjectPermissions pp = new ProjectPermissions();
    908           pp.setPermissions(project, project.getAutoPermission());
    909           loginInfo.projectKeyId = ProjectKey.getNewOrExistingId(null, pp.getProjectPermissions());
     909          PermissionTemplateData template = project.getData().getPermissionTemplate();
     910          if (template != null)
     911          {
     912            org.hibernate.Session session = null;
     913            org.hibernate.Transaction tx = null;
     914            try
     915            {
     916              if (project.isDetached())
     917              {
     918                // Make sure that we can load the template's item and project keys
     919                session = HibernateUtil.newSession();
     920                tx = HibernateUtil.newTransaction(session);
     921                template = HibernateUtil.loadData(session, PermissionTemplateData.class, template.getId());
     922              }
     923              ProjectKeyData pk = template.getProjectKey();
     924              ItemKeyData ik = template.getItemKey();
     925              loginInfo.projectKeyId = pk == null ? 0 : pk.getId();
     926              loginInfo.itemKeyId = ik == null ? 0 : ik.getId();
     927            }
     928            finally
     929            {
     930              if (tx != null) HibernateUtil.commit(tx);
     931              if (session != null) HibernateUtil.close(session);
     932            }
     933          }
     934          else
     935          {
     936            ProjectPermissions pp = new ProjectPermissions();
     937            pp.setPermissions(project, project.getAutoPermission());
     938            loginInfo.projectKeyId = ProjectKey.getNewOrExistingId(null, pp.getProjectPermissions());
     939            loginInfo.itemKeyId = 0;
     940          }
    910941        }
    911942        else
    912943        {
    913944          loginInfo.projectKeyId = 0;
     945          loginInfo.itemKeyId = 0;
    914946        }
    915947      }
     
    940972  {
    941973    return loginInfo == null ? 0 : loginInfo.projectKeyId;
     974  }
     975 
     976  /**
     977    Get the id of the {@link ItemKey} that new items should be shared to
     978    according to the settings in the currently active project. If no
     979    project is active or if the projects doesn't share to any item
     980    key, 0 is returned.
     981    Use {@link ItemKey#getById(DbControl, int)} to get the {@link ItemKey} object.
     982    @see #getActiveProjectId()
     983    @see #setActiveProject(Project)
     984    @see #getProjectKeyId()
     985    @since 2.16
     986  */
     987  public int getItemKeyId()
     988  {
     989    return loginInfo == null ? 0 : loginInfo.itemKeyId;
    942990  }
    943991 
     
    21052153
    21062154    /**
    2107       The id of the {@link ProjectKeyData} object that shares an item with
    2108       full permission to the active project.
     2155      The id of the {@link ProjectKeyData} object that new items should
     2156      be shared to.
    21092157    */
    21102158    private int projectKeyId;
     2159   
     2160    /**
     2161      The id of the {@link ItemKeyData} object that new items should be
     2162      shared to.
     2163    */
     2164    private int itemKeyId;
    21112165   
    21122166    /**
  • trunk/src/core/net/sf/basedb/core/ShareableUtil.java

    r5060 r5368  
    2828import net.sf.basedb.core.data.GroupData;
    2929import net.sf.basedb.core.data.ItemKeyData;
    30 import net.sf.basedb.core.data.ProjectData;
    3130import net.sf.basedb.core.data.ProjectKeyData;
    3231import net.sf.basedb.core.data.ShareableData;
     
    161160    is shared to the 'EVERYONE' group, but the logged in user lacks
    162161    the {@link Permission#SHARE_TO_EVERYONE} permission, the share to
    163     everyone is removed. If the 'to' item is a new item, a project
    164     is active and the 'from' item isn't already shared to the project,
    165     the 'to' item will be shared to the project.
     162    everyone is removed. If the 'to' item is a new item and a project
     163    is active the new item is also shared with the settings from
     164    the project.
    166165
    167166    @param from The item to copy permissions from
     
    179178    ProjectKey projectKey = from.getProjectKey();
    180179   
     180    GroupPermissions newGroupPermissions = null;
     181    UserPermissions newUserPermissions = null;
     182    ProjectPermissions newProjectPermissions = null;
     183   
     184    // If 'to' is a new item we may need to merge permission from the active project
     185    if (to.getId() == 0)
     186    {
     187      // Merge with item key permissions from active project
     188      if (sc.getItemKeyId() != 0 && itemKey != null)
     189      {
     190        ItemKey activeKey = ItemKey.getById(dc, sc.getItemKeyId());
     191        newUserPermissions = new UserPermissions(itemKey);
     192        newUserPermissions.merge(activeKey);
     193        newGroupPermissions = new GroupPermissions(itemKey);
     194        newGroupPermissions.merge(activeKey);
     195      }
     196      if (sc.getProjectKeyId() != 0 && projectKey != null)
     197      {
     198        newProjectPermissions = new ProjectPermissions(projectKey);
     199        newProjectPermissions.merge(ProjectKey.getById(dc, sc.getProjectKeyId()));
     200      }
     201    }
     202   
    181203    // Check if we need to remove permissions for the EVERYONE group
    182204    if (itemKey != null && !sc.hasSystemPermission(Permission.SHARE_TO_EVERYONE))
     
    185207        SystemItems.getId(Group.EVERYONE));
    186208
    187       if (itemKey.getData().getGroups().containsKey(everyone))
     209      if (itemKey.getData().getGroups().containsKey(everyone) ||
     210        (newGroupPermissions != null && newGroupPermissions.getGroupPermissions().containsKey(everyone)))
    188211      {
    189212        // Remove the EVERYONE grup
    190         GroupPermissions gp = new GroupPermissions(itemKey);
    191         gp.getGroupPermissions().remove(everyone);
    192        
    193         UserPermissions up = new UserPermissions(itemKey);
    194         if (up.size() == 0 && gp.size() == 0)
    195         {
    196           itemKey = null;
    197         }
    198         else
    199         {
    200           itemKey = ItemKey.getNewOrExisting(dc, up, gp);
    201         }
    202       }
    203     }
    204 
    205     // Check if we need to add permissions for the current project
    206     if (projectKey != null && sc.getProjectKeyId() != 0 && to.getId() == 0)
    207     {
    208       ProjectData project = HibernateUtil.loadData(dc.getHibernateSession(),
    209           ProjectData.class, sc.getActiveProjectId());
    210      
    211       if (!projectKey.getData().getProjects().containsKey(project))
    212       {
    213         // Add the current project
    214         ProjectKey activeKey = ProjectKey.getById(dc, sc.getProjectKeyId());
    215         ProjectPermissions pp = new ProjectPermissions(projectKey);
    216         pp.getProjectPermissions().put(project, activeKey.getData().getProjects().get(project));
    217         projectKey = ProjectKey.getNewOrExisting(dc, pp);
     213        if (newGroupPermissions == null) newGroupPermissions = new GroupPermissions(itemKey);
     214        if (newUserPermissions == null) newUserPermissions = new UserPermissions(itemKey);
     215        newGroupPermissions.getGroupPermissions().remove(everyone);
     216      }
     217    }
     218
     219    if (newUserPermissions != null || newGroupPermissions != null)
     220    {
     221      if (newUserPermissions.size() == 0 && newGroupPermissions.size() == 0)
     222      {
     223        itemKey = null;
     224      }
     225      else
     226      {
     227        itemKey = ItemKey.getNewOrExisting(dc, newUserPermissions, newGroupPermissions);
     228      }
     229    }
     230    if (newProjectPermissions != null)
     231    {
     232      if (newProjectPermissions.size() == 0)
     233      {
     234        projectKey = null;
     235      }
     236      else
     237      {
     238        projectKey = ProjectKey.getNewOrExisting(dc, newProjectPermissions);
    218239      }
    219240    }
  • trunk/src/core/net/sf/basedb/core/SharedItem.java

    r4889 r5368  
    2323package net.sf.basedb.core;
    2424
     25import net.sf.basedb.core.data.ItemKeyData;
    2526import net.sf.basedb.core.data.SharedData;
    2627import net.sf.basedb.core.data.ProjectKeyData;
     
    4445 
    4546  private boolean projectKeySet = false;
     47  private boolean itemKeySet = false;
    4648 
    4749  SharedItem(D sharedData)
     
    6466    checkPermission(Permission.SET_PERMISSION);
    6567    ShareableUtil.setItemKey(getDbControl(), getData(), itemKey);
     68    itemKeySet = true;
    6669  }
    6770  public ProjectKey getProjectKey()
     
    8891  */
    8992  /**
    90     If a project is active, automatically share the new item to that project
    91     unless a project key has been explicitely set (including null).
     93    If a project is active, automatically share the new item according to
     94    the settings of that project, unless a project or item key has been
     95    explicitely set (including null).
    9296    @throws BaseException If there is another error
    9397  */
     
    96100  {
    97101    super.onBeforeCommit(action);
    98     if (action == Transactional.Action.CREATE && !projectKeySet)
     102    if (action == Transactional.Action.CREATE)
    99103    {
     104      org.hibernate.Session session = getDbControl().getHibernateSession();
    100105      int activeProjectKeyId = getSessionControl().getProjectKeyId();
    101       if (activeProjectKeyId != 0)
     106      if (activeProjectKeyId != 0 && !projectKeySet)
    102107      {
    103         org.hibernate.Session session = getDbControl().getHibernateSession();
    104108        getData().setProjectKey(HibernateUtil.loadData(session, ProjectKeyData.class, activeProjectKeyId));
     109      }
     110      int activeItemKeyId = getSessionControl().getItemKeyId();
     111      if (activeItemKeyId != 0 && !itemKeySet)
     112      {
     113        getData().setItemKey(HibernateUtil.loadData(session, ItemKeyData.class, activeItemKeyId));
    105114      }
    106115    }
  • trunk/src/core/net/sf/basedb/core/Update.java

    r5360 r5368  
    5151import net.sf.basedb.core.data.JobData;
    5252import net.sf.basedb.core.data.MeasuredBioMaterialData;
     53import net.sf.basedb.core.data.PermissionTemplateData;
    5354import net.sf.basedb.core.data.PlateData;
    5455import net.sf.basedb.core.data.PlateMappingData;
     
    890891    <td>
    891892      Added {@link FileData#getUrl()} and {@link FileServer}.
     893      No special update is needed. Only increase the schema version.
     894    </td>
     895  </tr>
     896  <tr>
     897    <td>82</td>
     898    <td>
     899      Added {@link PermissionTemplateData} and {@link ProjectData#getPermissionTemplate()}.
     900      No special update is needed. Only increase the schema version.
    892901    </td>
    893902  </tr>
     
    12161225      }
    12171226     
    1218       // Schemaversion 81 only updates the version number
    1219       if (schemaVersion < 81)
    1220       {
    1221         if (progress != null) progress.display((int)(80*progress_factor), "--Updating schema version: " + schemaVersion + " -> 81...");
    1222         schemaVersion = setSchemaVersionInTransaction(session, 81);
     1227      // Schemaversion 81-82 only updates the version number
     1228      if (schemaVersion < 82)
     1229      {
     1230        if (progress != null) progress.display((int)(81*progress_factor), "--Updating schema version: " + schemaVersion + " -> 82...");
     1231        schemaVersion = setSchemaVersionInTransaction(session, 82);
    12231232      }
    12241233   
  • trunk/src/core/net/sf/basedb/core/UserPermissions.java

    r4889 r5368  
    8080
    8181  /**
     82    Merge the permissions for all users from the given item key with the permissions
     83    in this object. If the item key contains permissions for a user that already
     84    has permissions in this object the permissions are combined (added) to create
     85    a new permission.
     86   
     87    @param itemKey An item key (if null, this method simply returns)
     88    @since 2.16
     89  */
     90  public void merge(ItemKey itemKey)
     91  {
     92    if (itemKey == null) return;
     93    for (Map.Entry<UserData, Integer> entry : itemKey.getData().getUsers().entrySet())
     94    {
     95      UserData user = entry.getKey();
     96      int permissions = IntegerUtil.getInt(entry.getValue());
     97      int current = IntegerUtil.getInt(userPermissions.get(user));
     98      userPermissions.put(user, current | permissions);
     99    }
     100  }
     101 
     102  /**
    82103    Grant permissions to a user. Use an empty <code>Set</code> or null
    83104    to remove all permissions for the user.
  • trunk/src/core/net/sf/basedb/core/data/ProjectData.java

    r4889 r5368  
    114114  }
    115115 
     116  private PermissionTemplateData permissionTemplate;
     117  /**
     118    A permission template can be used to set default permissions
     119    when this project is active.
     120    @return A permission template or null
     121    @since 2.16
     122    @hibernate.many-to-one column="`permissiontemplate_id`" not-null="false"
     123  */
     124  public PermissionTemplateData getPermissionTemplate()
     125  {
     126    return permissionTemplate;
     127  }
     128  public void setPermissionTemplate(PermissionTemplateData permissionTemplate)
     129  {
     130    this.permissionTemplate = permissionTemplate;
     131  }
     132 
    116133  private Map<UserData,Integer> users;
    117134  /**
  • trunk/src/test/TestAll.java

    r5360 r5368  
    4444    results.put("TestProjectKey", TestProjectKey.test_all());
    4545    results.put("TestItemKey", TestItemKey.test_all());
     46    results.put("TestPermissionTemplate", TestPermissionTemplate.test_all());
    4647
    4748    // Settings, sessions and client
  • trunk/src/test/TestGroup.java

    r5340 r5368  
    6666
    6767    // Extra tests: add, list and remove projects
    68     int projectId = TestProject.test_create(true);
     68    int projectId = TestProject.test_create("Group project", true);
    6969    test_listprojects(id, 0);
    7070    TestProject.test_addgroup(projectId, id, EnumSet.of(Permission.WRITE));
  • trunk/src/test/TestItemKey.java

    r5024 r5368  
    137137          numDeleted + "; expected " + expected);
    138138      }
    139       write("--Delete unused item keys OK (" + expected + ")");
     139      write("--Delete unused item keys OK (" + numDeleted + ")");
    140140    }
    141141    catch (Throwable ex)
  • trunk/src/test/TestProject.java

    r5340 r5368  
    4646    write_header();
    4747    // Standard tests: create, load, list
    48     int id = test_create(true);
    49     int id2 = test_create(false);
     48    int id = test_create("Test project #1", true);
     49    int id2 = test_create("Test project #2", false);
    5050    test_load(id);
    5151    test_list(-1);
     
    126126  }
    127127
    128   static int test_create(boolean setAll)
     128  static int test_create(String name, boolean setAll)
    129129  {
    130130    if (!TestUtil.hasPermission(Permission.CREATE, Item.PROJECT)) return 0;
     
    135135      dc = TestUtil.getDbControl();
    136136      Project p = Project.getNew(dc);
     137      p.setName(name);
    137138      if (setAll)
    138139      {
    139         p.setName("Test project");
    140140        p.setDescription("Added at "+new Date());
    141141      }
  • trunk/src/test/TestProjectKey.java

    r5024 r5368  
    4646   
    4747    // Extra test: create project for the key
    48     int projectId = TestProject.test_create(true);
     48    int projectId = TestProject.test_create("Test project", true);
    4949   
    5050    // Standard tests: create, load
     
    158158          numDeleted + "; expected " + expected);
    159159      }
    160       write("--Delete unused project keys OK (" + expected + ")");
     160      write("--Delete unused project keys OK (" + numDeleted + ")");
    161161    }
    162162    catch (Throwable ex)
  • trunk/src/test/TestUser.java

    r5340 r5368  
    7676   
    7777    // Extra tests: add, list and remove projects
    78     int projectId = TestProject.test_create(true);
     78    int projectId = TestProject.test_create("User project", true);
    7979    test_listprojects(id, 0);
    8080    TestProject.test_adduser(projectId, id, EnumSet.of(Permission.WRITE));
  • trunk/src/test/TestWebservices.java

    r5233 r5368  
    9494
    9595    //Create items to use in the tests   
    96     int projectId = TestProject.test_create(true);
     96    int projectId = TestProject.test_create("Web service project", true);
    9797
    9898    int reporterListId1 = TestReporterList.test_create("net.sf.basedb.clients.test.reporterlist1", true);
Note: See TracChangeset for help on using the changeset viewer.