home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
roles.tcl
< prev
next >
Wrap
Text File
|
1997-09-02
|
4KB
|
164 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: %W%
# Author: M. van Leeuwen
# Description: Report on security
# Usage in: Corporate to System Level
#
#---------------------------------------------------------------------------
# SccsId = %W% %G% Copyright 1997 Cayenne Software Inc.
Class ReportRoles : {ReportBase} {
constructor
method printRoles
method printUsers
method corporateReport
method projectReport
method configReport
method phaseReport
method systemReport
}
constructor ReportRoles {class this} {
set this [ReportBase::constructor $class $this]
$this reportName "Roles and Users"
return $this
}
method ReportRoles::printUsers {this} {
set report [$this report]
set corp [$this corporate]
$report header {
$report print User 16
$report print SecurityLevel 36
$report print "Activated roles" line
$report print - 80 fill line
}
foreach user [osort name [$corp users]] {
$report print [$user name] 15
$report space
$report print "Corporate '[$corp name]'" 35
$report space
set cnt 0
foreach rolelink [$corp roleLinks $user] {
if ![$report queued] { $report space 52 }
$report print [[$rolelink role] name] 15
$report space
incr cnt
if {$cnt > 4 } { $report line }
}
if [$report queued] { $report line }
foreach proj [$corp projects] {
$report space 16
$report print "Project '[$proj name]'" 35
$report space
set cnt 0
foreach rolelink [$proj roleLinks $user] {
if ![$report queued] { $report space 52 }
$report print [[$rolelink role] name] 15
$report space
incr cnt
if {$cnt > 3 } { $report line }
}
if [$report queued] { $report line }
}
$report line
}
$report line
}
method ReportRoles::printRoles {this} {
set report [$this report]
set corp [$this corporate]
$report header {
$report print Role 16
$report print SecurityLevel 36
$report print User 16
$report print Use line
$report print - 80 fill line
}
foreach role [osort name [$corp roles]] {
$report print [$role name] 15
$report space
$report print "Corporate '[$corp name]'" 35
$report space
foreach user [$role users $corp] {
if ![$report queued] { $report space 52 }
$report print [$user name] 15
$report space
set link [$role findUserLink $corp [$user name]]
if ![$link isNil] {
$report print [$link use]
} else {
$report print "?"
}
$report line
}
foreach proj [$corp projects] {
$report space 16
$report print "Project '[$proj name]'" 35
$report space
foreach user [$role users $proj] {
if ![$report queued] { $report space 52 }
$report print [$user name] 15
$report space
set link [$role findUserLink $proj [$user name]]
if ![$link isNil] {
$report print [$link use]
} else {
$report print "?"
}
$report line
}
if [$report queued] { $report line }
}
$report line
}
$report line
}
method ReportRoles::corporateReport {this} {
set report [$this report]
set corp [$this corporate]
$this printRoles
$report page
$report remove header
$this printUsers
$report page
return 0
}
method ReportRoles::projectReport {this} {
return [$this corporateReport]
}
method ReportRoles::configReport {this} {
return [$this corporateReport]
}
method ReportRoles::phaseReport {this} {
return [$this corporateReport]
}
method ReportRoles::systemReport {this} {
return [$this corporateReport]
}
# ----------------------------------------------------------------------
set executeMe [ReportRoles new]