Hello, > I would like to be able to check that a user has access to a repository (ie > has valid credentials) - before attempting to checkout/export/commit to the
If you'd like to test read access, then you may simply call SVNRepository.testConnection() assuming you've set proper ISVNAuthenticationManager on the SVNRepository instance (same you'd use for checkout operation). In case user do not have read access to repository, then SVNAuthenticationException will be thrown by SVNRepository.testConnection() method. Alexander Kitaev, TMate Software, http://svnkit.com/ - Java [Sub]Versioning Library! http://hg4j.com/ - Java Mercurial Library! http://sqljet.com/ - Java SQLite Library! On 12 October 2011 07:31, SteveV <[email protected]> wrote: > I would like to be able to check that a user has access to a repository (ie > has valid credentials) - before attempting to checkout/export/commit to the > repository (ie if the user has provided incorrect id/password, the > application can re-request them). In wiki.svnkit.com/Authentication under > Forced Authentication, it suggests that this is possible however, I don't > understand how to implement what it suggests (what flag?). My current > operational code for creating authentication is: . . repository = > SVNRepositoryFactory.create(SVNURL.parseURIEncoded(cilRepos)); authManager = > SVNWCUtil.createDefaultAuthenticationManager(user, passwd); > repository.setAuthenticationManager(authManager); fileProperties = new > SVNProperties(); baos = new ByteArrayOutputStream(); . . so after I've setup > the 'repository' driver, I'd like to know that 'user' is 'authorised' to > access the repository! Hope this makes sense to someone - thanks in > anticipation of your help. > ________________________________ > View this message in context: Validation of user credentials > Sent from the SVNKit - Users mailing list archive at Nabble.com. >
