[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.6, Fri Feb 15 16:58:13 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          if ( $seeduser eq $curatorOfSS ) {
77            # now set the rights...
78            my $right = $dbmaster->Rights->create( { name => 'edit',
79                                                     scope => $user->get_user_scope,
80                                                     data_type => 'subsystem',
81                                                     data_id => $name,
82                                                     granted => 1,
83                                                     delegated => 0 } );
84            if ( $right ) {
85              $can_alter = 1;
86              $fig->set_user( $seeduser );
87            }
88          }
89        }
90      }
91    
92    ######################    ######################
93    # Construct the menu #    # Construct the menu #
94    ######################    ######################
# Line 156  Line 177 
177    my ( $ssversion, $sscurator, $pedigree, $ssroles ) = $fig->subsystem_info( $name );    my ( $ssversion, $sscurator, $pedigree, $ssroles ) = $fig->subsystem_info( $name );
178    
179    my $versionlink = '';    my $versionlink = '';
180  print STDERR $can_alter." CANALTER\n";  
181    if ( $can_alter ) {    if ( $can_alter ) {
182      $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";  
183    }    }
184    
185    my $mod_time = get_mod_time( $name );    my $mod_time = get_mod_time( $name );
# Line 184  Line 204 
204      $classification_stuff .= "<TR><TH></TH><TD>$class->[1]</TD></TR>";      $classification_stuff .= "<TR><TH></TH><TD>$class->[1]</TD></TR>";
205    }    }
206    
     print STDERR $versionlink . " VL\n";  
207    my $infotable = "<TABLE><TR><TH>Name:</TH><TD>$ssname</TD><TR>";    my $infotable = "<TABLE><TR><TH>Name:</TH><TD>$ssname</TD><TR>";
208    $infotable .= "<TR><TH>Author:</TH><TD>$sscurator</TD></TR>";    $infotable .= "<TR><TH>Author:</TH><TD>$sscurator</TD></TR>";
209    $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.6

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3