Skip to content
Snippets Groups Projects
Commit 04550954 authored by cramakri's avatar cramakri
Browse files

Factored out methods for user management

SVN: 27425
parent 2dd729a4
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,11 @@ ...@@ -33,6 +33,11 @@
@synthesize rootOpenBisModel = _rootOpenBisModel; @synthesize rootOpenBisModel = _rootOpenBisModel;
@synthesize serviceManager = _serviceManager; @synthesize serviceManager = _serviceManager;
#pragma mark - User management
- (NSString *)username { return @"admin"; }
- (NSString *)password { return @"password"; }
- (void)configureControllers; - (void)configureControllers;
{ {
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
...@@ -67,7 +72,7 @@ ...@@ -67,7 +72,7 @@
controller.openBisModel = self.rootOpenBisModel; controller.openBisModel = self.rootOpenBisModel;
// Initialize the connection to openBIS // Initialize the connection to openBIS
CISDOBAsyncCall *call = [self.serviceManager loginUser: @"admin" password: @"password"]; CISDOBAsyncCall *call = [self.serviceManager loginUser: [self username] password: [self password]];
call.success = ^(id result) { call.success = ^(id result) {
[controller didConnectServiceManager: self.serviceManager]; [controller didConnectServiceManager: self.serviceManager];
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment