use of org.graylog.security.DBGrantService in project graylog2-server by Graylog2.
the class ViewOwnershipToGrantsMigrationTest method setUp.
@BeforeEach
void setUp(MongoDBTestService mongodb, MongoJackObjectMapperProvider objectMapperProvider, GRNRegistry grnRegistry, @Mock ClusterConfigService clusterConfigService, @Mock UserService userService, @Mock ViewSummaryService viewSummaryService) {
this.userService = userService;
this.grantService = new DBGrantService(mongodb.mongoConnection(), objectMapperProvider, grnRegistry);
final EntityOwnershipService entityOwnershipService = new EntityOwnershipService(grantService, grnRegistry);
final TestViewService viewService = new TestViewService(mongodb.mongoConnection(), objectMapperProvider, clusterConfigService, entityOwnershipService, viewSummaryService);
this.migration = new ViewOwnerShipToGrantsMigration(userService, grantService, "admin", viewService, grnRegistry);
}
use of org.graylog.security.DBGrantService in project graylog2-server by Graylog2.
the class RolesToGrantsMigrationTest method setUp.
@BeforeEach
void setUp(MongoDBTestService mongodb, MongoJackObjectMapperProvider mongoJackObjectMapperProvider, GRNRegistry grnRegistry, TestUserService userService) {
when(permissions.readerBasePermissions()).thenReturn(ImmutableSet.of());
when(validator.validate(any())).thenReturn(ImmutableSet.of());
this.grnRegistry = grnRegistry;
roleService = new RoleServiceImpl(mongodb.mongoConnection(), mongoJackObjectMapperProvider, permissions, validator);
dbGrantService = new DBGrantService(mongodb.mongoConnection(), mongoJackObjectMapperProvider, grnRegistry);
this.userService = userService;
DBGrantService dbGrantService = new DBGrantService(mongodb.mongoConnection(), mongoJackObjectMapperProvider, grnRegistry);
migration = new RolesToGrantsMigration(roleService, userService, dbGrantService, grnRegistry, "admin");
}
Aggregations