Example #1
0
void User::set_permission(Rights perm, bool can) {
    Rights r = rights();
    if (can) {
        r = Rights(r | perm);
    } else {
        r = Rights(r & (~perm));
    }
    set_rights(r);
}
Example #2
0
UserRights User::rights() const {
    Rights result = rights_;
    if (vacation_until_.isValid() && vacation_until_ > now()) {
        result = Rights(result & Options::instance()->vacation_rights());
    }
    return result;
}
Example #3
0
//---------------------------------------------------------------------------
TChmodSessionAction::TChmodSessionAction(
    TActionLog * Log, const UnicodeString & FileName, const TRights & ARights) :
  TFileSessionAction(Log, laChmod, FileName)
{
  Rights(ARights);
}