home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Westmount Technology 1994
- #
- # File: @(#)showaccess.tcl 1.5
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)showaccess.tcl 1.5 26 Mar 1996 Copyright 1994 Westmount Technology
-
- # Start user added include file section
- # End user added include file section
-
- require "accesscont.tcl"
-
- Class ShowAccessRightsDlg : {AccessControlDlg} {
- constructor
- method destructor
- method popUp
- method selectedObjectSetChanged
- method updateLabel
- }
-
- constructor ShowAccessRightsDlg {class this name} {
- set this [AccessControlDlg::constructor $class $this $name]
- # Start constructor user section
-
- $this editable 0
-
- # End constructor user section
- return $this
- }
-
- method ShowAccessRightsDlg::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this AccessControlDlg::destructor
- }
-
- method ShowAccessRightsDlg::popUp {this} {
- $this createObjectsIf
- $this createActionsIf
- $this updateLabel
- $this selectedObjectSetChanged
- $this TemplateDialog::popUp
- }
-
- method ShowAccessRightsDlg::selectedObjectSetChanged {this} {
- $this AccessControlDlg::selectedObjectSetChanged
-
- foreach id [$this.top.row.leftCol.objects.list selectedIndexSet] {
- set obj [[$this selectedSet] index $id]
- foreach action [$obj getInfo "Controlled Actions"] {
- set actionIf $this.top.row.rightCol.actions.col.$action
- $actionIf.label sensitive 1
- if [$obj hasPermission $action] {
- set allowed [$this getAllowed $action]
- $this setAllowed $action [expr $allowed + 1]
- } else {
- set prohibited [$this getProhibited $action]
- $this setProhibited $action [expr $prohibited + 1]
- }
- }
- }
-
- $this updateActionsIf
- }
-
- method ShowAccessRightsDlg::updateLabel {this} {
- set label "Effective context: [BrowserProcs::effectiveRoles]\n"
- $this.top.label text "$label"
- }
-
- # Do not delete this line -- regeneration end marker
-
-