Don't add objects which have privilege=internal to the hdb tree.
r2222 | ffr | 2007-11-05 13:14:25 +1100 (Mon, 05 Nov 2007) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
9b6fb6ac77
commit
05c5b5ee12
@@ -300,7 +300,10 @@ proc ::hdb::sobjadd {hpath sobj args} {
|
||||
if {[lsearch [hlist $hpath] $sobjatt(long_name)] != -1} {
|
||||
clientput "ERROR: $hpath/$sobjatt(long_name) for $sobj exists" error
|
||||
} else {
|
||||
add_node $hpath kind $sobjatt(kind) node $sobj priv $sobjatt(privilege)
|
||||
set node_path [add_node $hpath kind $sobjatt(kind) node $sobj priv $sobjatt(privilege) ]
|
||||
if [info exists sobjatt(mutable)] {
|
||||
if {[catch {hsetprop $node_path mutable $sobjatt(mutable)} err]} {clientput $err error}
|
||||
}
|
||||
}
|
||||
}
|
||||
sicsvariable {
|
||||
@@ -386,7 +389,11 @@ proc ::hdb::sobjadd {hpath sobj args} {
|
||||
# @see sobjadd
|
||||
proc ::hdb::sobjtypeadd {hpath sobjtype given_klass} {
|
||||
foreach {sobj} [sobjlist $sobjtype $given_klass] {
|
||||
sobjadd $hpath $sobj
|
||||
array unset sobjatt
|
||||
array set sobjatt [attlist $sobj]
|
||||
if {[info exists sobjatt(privilege)] && $sobjatt(privilege) != "internal"} {
|
||||
sobjadd $hpath $sobj
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user