Revision b52f0f7d
Added by Marc Dequènes over 15 years ago
- ID b52f0f7dd2e38270b9d123a28907deeba34dd249
bin/shadowwalker | ||
---|---|---|
|
||
cmdparser.options = CmdParse::OptionParserWrapper.new do |opt|
|
||
opt.separator "Global options:"
|
||
opt.on("-a", "--admin", "Output extra info for administrators") {|t| $program_options[:admin] = true }
|
||
opt.on("-d", "--debug", "Output debug info without being formated") {|t| $program_options[:debug] = true }
|
||
opt.on("-e", "--expert", "Output extra info for expert users") {|t| $program_options[:expert] = true }
|
||
opt.on("-H", "--handles", "Output with handles (objects/field/... keys used for manipulations)") {|t| $program_options[:handles] = true }
|
||
... | ... | |
obj_klass
|
||
end
|
||
|
||
def params_shift_item(obj_klass, args, with_expert = false)
|
||
def params_shift_item(obj_klass, args)
|
||
raise SyntaxError, _("no item name given") if args.empty?
|
||
|
||
attr_list = ["*"]
|
||
attr_list << "+" if $program_options[:expert] and with_expert # add operational attributes if expert
|
||
attr_list << "+" if $program_options[:admin]
|
||
|
||
item_hdl = args.shift.downcase
|
||
begin
|
||
... | ... | |
|
||
def execute (args)
|
||
obj_klass = params_shift_object(args)
|
||
item = params_shift_item(obj_klass, args, true)
|
||
item = params_shift_item(obj_klass, args)
|
||
|
||
if args.empty?
|
||
$program_options[:skip_binary] = true
|
Also available in: Unified diff
[evol] move all activeldap workarounds away, and properly manage operational attributes (using schema instead of a hardcoded list)