[Bio] / SubsystemEditor / WebPage / ShowSubsystem.pm Repository:
ViewVC logotype

Diff of /SubsystemEditor/WebPage/ShowSubsystem.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4, Thu Dec 13 21:17:21 2007 UTC revision 1.7, Sat Feb 23 04:02:45 2008 UTC
# Line 64  Line 64 
64      }      }
65    }    }
66    
67    if ( $user && $user->has_right( $self->application, 'edit', 'subsystem', $name ) ) {    if ( $user ) {
68        if ( $user->has_right( $self->application, 'edit', 'subsystem', $name ) ) {
69      $can_alter = 1;      $can_alter = 1;
70      $fig->set_user( $seeduser );      $fig->set_user( $seeduser );
71    }    }
72        else {
73          # we might have the problem that the user has not yet got the right for editing the
74          # subsystem due to that it was created in the old seed or what do I know where.
75          my $curatorOfSS = $fig->subsystem_curator( $name );
76          my $su = lc( $seeduser );
77          my $cu = lc( $curatorOfSS );
78          if ( $su eq $cu ) {
79            # now set the rights...
80            my $right = $dbmaster->Rights->create( { name => 'edit',
81                                                     scope => $user->get_user_scope,
82                                                     data_type => 'subsystem',
83                                                     data_id => $name,
84                                                     granted => 1,
85                                                     delegated => 0 } );
86            if ( $right ) {
87              $can_alter = 1;
88              $fig->set_user( $seeduser );
89            }
90          }
91        }
92      }
93    
94    ######################    ######################
95    # Construct the menu #    # Construct the menu #
96    ######################    ######################
# Line 156  Line 179 
179    my ( $ssversion, $sscurator, $pedigree, $ssroles ) = $fig->subsystem_info( $name );    my ( $ssversion, $sscurator, $pedigree, $ssroles ) = $fig->subsystem_info( $name );
180    
181    my $versionlink = '';    my $versionlink = '';
182  print STDERR $can_alter." CANALTER\n";  
183    if ( $can_alter ) {    if ( $can_alter ) {
184      $versionlink = " -- <A HREF='".$self->application->url()."?page=ResetSubsystem&subsystem=$name'>Reset to Previous Timestamp</A>";      $versionlink = " -- <A HREF='".$self->application->url()."?page=ResetSubsystem&subsystem=$name'>Reset to Previous Timestamp</A>";
     print STDERR $versionlink . " VL\n";  
185    }    }
186    
187    my $mod_time = get_mod_time( $name );    my $mod_time = get_mod_time( $name );
# Line 184  Line 206 
206      $classification_stuff .= "<TR><TH></TH><TD>$class->[1]</TD></TR>";      $classification_stuff .= "<TR><TH></TH><TD>$class->[1]</TD></TR>";
207    }    }
208    
     print STDERR $versionlink . " VL\n";  
209    my $infotable = "<TABLE><TR><TH>Name:</TH><TD>$ssname</TD><TR>";    my $infotable = "<TABLE><TR><TH>Name:</TH><TD>$ssname</TD><TR>";
210    $infotable .= "<TR><TH>Author:</TH><TD>$sscurator</TD></TR>";    $infotable .= "<TR><TH>Author:</TH><TD>$sscurator</TD></TR>";
211    $infotable .= "<TR><TH>Version:</TH><TD>$ssversion $versionlink</TD></TR>";    $infotable .= "<TR><TH>Version:</TH><TD>$ssversion $versionlink</TD></TR>";

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.7

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3