зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
894dbe249a
Коммит
9a26cf12c7
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче