public bool createPermissionForContributing(string username, string sourcepathID) { User user = Context.gateway.findUser(username); Sourcepath sourcepath = Context.gateway.findSourcepathById(sourcepathID); Permission permission = new Permission(user, sourcepath); Context.gateway.grantPermission(permission); return(useCase.isContributeAccessEnabledOnSourcepath(user, sourcepath)); }
static void Main(string[] args) { Console.WriteLine("Hello World!"); Context.gateway = new MockGateway(); Sourcepath sourcepaths = Context.gateway.findSourcepathById("SourcePath"); Context.gateway.Save(new User("username")); }
public Permission(PermissionLevel type, User user, Sourcepath sourcepath) { this.type = type; this.user = user; this.sourcepath = sourcepath; }
public void grantPermission(User user, Permission permission, Sourcepath sourcepath) { Permission permissions = Context.permissionGateway.findPermissionForUserAndSourcepath(user, sourcepath); if(permissions.) }