public static bool IsPlatformAdmin(this User user, IRepository <Securable> securableRepo) { //TODO no magic number here would be nice. Find somewhere to put the platform admin securable id return(securableRepo.IsMemberOfSecurable(1, user.Id)); }
public static bool IsPlatformAdmin(this User user, IRepository<Securable> securableRepo) { //TODO no magic number here would be nice. Find somewhere to put the platform admin securable id return securableRepo.IsMemberOfSecurable(1, user.Id); }
public static bool IsAdminOfBlog(this User user, Data.Blog blog, IRepository <Securable> securableRepo) { return(securableRepo.IsMemberOfSecurable(blog.AdminSecurableId, user.Id) || user.IsPlatformAdmin(securableRepo)); }
public static bool IsAdminOfBlog(this User user, Data.Blog blog, IRepository<Securable> securableRepo) { return securableRepo.IsMemberOfSecurable(blog.AdminSecurableId, user.Id) || user.IsPlatformAdmin(securableRepo); }