Added isVisitor, isAdmin, and isRegistered methods to User object instead

of hard coding checks everywhere with group ids. And updated the code base 
   to match.
This commit is contained in:
JT Smith 2008-09-16 22:32:36 +00:00
parent 586164d8d0
commit ef120fb06b
52 changed files with 201 additions and 118 deletions

View file

@ -487,7 +487,7 @@ sub getRichEditor {
theme_advanced_toolbar_location => $self->getValue("toolbarLocation"),
theme_advanced_statusbar_location => "bottom",
valid_elements => $self->getValue("validElements"),
wg_userIsVisitor => $self->session->user->userId eq '1' ? JSON::true() : JSON::false(),
wg_userIsVisitor => $self->session->user->isVisitor ? JSON::true() : JSON::false(),
);
foreach my $button (@toolbarButtons) {
if ($button eq "spellchecker" && $self->session->config->get('availableDictionaries')) {