Added a hash of the user's rights to the user hash to make it easier to enable or disable UI elements

This commit is contained in:
ian%hixie.ch 2001-07-26 03:40:56 +00:00
Родитель 894dbe249a
Коммит 9a26cf12c7
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -245,10 +245,11 @@ sub hash {
$result->{'adminMessage'} = $self->adminMessage,
$result->{'groups'} = $self->groups;
$result->{'rights'} = [keys(%{$self->rights})];
$result->{'right'} = $self->rights;
$result->{'fields'} = {};
foreach my $field (values(%{$self->fieldsByID})) {
# XXX should we also pass the field metadata on? (e.g. typeData)
$result->{'fields'}->{$field->fieldID} = $field->data;
$result->{'fields'}->{$field->fieldID} = $field->data; # (not an array btw)
$result->{'fields'}->{$field->category.':'.$field->name} = $field->data;
}
return $result;