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