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