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"));
        }
Beispiel #3
0
 public Permission(PermissionLevel type, User user, Sourcepath sourcepath)
 {
     this.type       = type;
     this.user       = user;
     this.sourcepath = sourcepath;
 }
Beispiel #4
0
 public void grantPermission(User user, Permission permission, Sourcepath sourcepath)
 {
     Permission permissions = Context.permissionGateway.findPermissionForUserAndSourcepath(user, sourcepath);
     if(permissions.)
 }