internal void UpdateProjectFlags(int id, ProjectFlag flags) { CheckIsAdmin(); Project p = GetProject(id); p.Flags = flags; db.UpdateObject(p); }
public ActionResult UpdateFlags(int projectId, bool allowDirectPublish, bool allowPackageUpload) { if (!CurrentUserModel.IsAdmin) { throw new Exception("Unauthorised"); } ProjectFlag flags = ProjectFlag.None; if (allowDirectPublish) { flags |= ProjectFlag.AllowDirectPublish; } if (allowPackageUpload) { flags |= ProjectFlag.AllowPackageUpload; } CurrentUserModel.UpdateProjectFlags(projectId, flags); return(RedirectToAction("Index", new { id = projectId })); }
internal void UpdateProjectFlags(int id, ProjectFlag flags) { CheckIsAdmin (); Project p = GetProject (id); p.Flags = flags; db.UpdateObject (p); }
public bool HasFlag(ProjectFlag flag) { return((Flags & flag) == flag); }
public bool HasFlag(ProjectFlag flag) { return (Flags & flag) == flag; }