if Settings.status != "database_offline"
can [:index, :new, :create, :show, :edit, :update, :destroy], ClientApplication
can [:new, :create, :edit, :update, :comment, :subscribe, :unsubscribe], DiaryEntry
if Settings.status != "database_offline"
can [:index, :new, :create, :show, :edit, :update, :destroy], ClientApplication
can [:new, :create, :edit, :update, :comment, :subscribe, :unsubscribe], DiaryEntry