Changeset 6101


Ignore:
Timestamp:
Sep 4, 2012, 11:34:05 AM (9 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1713: Permission denied when copying annotations between items

Location:
trunk/src/core/net/sf/basedb/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/Annotation.java

    r6037 r6101  
    116116 
    117117  private AnnotationSet annotationSet;
    118 
     118  private boolean disableATPermissionCheck;
     119 
    119120  Annotation(AnnotationData annotationData)
    120121  {
     
    151152  {
    152153    AnnotationSet as = getAnnotationSet();
    153     AnnotationType at = getAnnotationType();
     154    if (!disableATPermissionCheck)
     155    {
     156      AnnotationType at = getAnnotationType();
     157    }
    154158    if (as.hasPermission(Permission.WRITE))
    155159    {
     
    172176  // -------------------------------------------
    173177
     178  void disableATPermissionCheck()
     179  {
     180    this.disableATPermissionCheck = true;
     181  }
     182 
    174183  /**
    175184    Get the annotation set this annotation belongs to.
  • trunk/src/core/net/sf/basedb/core/AnnotationSet.java

    r5590 r6101  
    856856          toAnnotations.put(at, to);
    857857          Annotation newAnnotation = new Annotation(to, this);
     858          newAnnotation.disableATPermissionCheck();
    858859          dc.saveItemIf(this, newAnnotation, false);
    859860        }
Note: See TracChangeset for help on using the changeset viewer.