return new CaptureType(oDms.getDocument(oLst.get(0).id()));
}
public void grantAll(AtrilSession oSes)
throws ElementNotFoundException, NotEnoughRightsException, DmsException, InstantiationException, IllegalAccessException {
AuthorizationManager oAum = oSes.getAuthorizationManager();
Dms oDms = oSes.getDms();
DocumentRights oGrt = RightsFactory.getDocumentRightsAllGrant();
ArrayList<User> aUsrs = Users.top(oSes).list(oSes);
Document oCpts = getDocument();
for (User u : aUsrs) {
String sNick = u.getNickName();
if (!sNick.equals("admin")) {
es.ipsa.atril.sec.user.User oUsr = oAum.getUser(sNick);
oAum.setDocumentRights(oUsr, oCpts, oGrt);
for (Document t : oCpts.children()) {
oAum.setDocumentRights(oUsr, oDms.getDocument(t.id()), oGrt);
for (Document f : t.children()) {
oAum.setDocumentRights(oUsr, oDms.getDocument(f.id()), oGrt);
for (Document s : f.children()) {
oAum.setDocumentRights(oUsr, oDms.getDocument(s.id()), oGrt);
} // next
} // next
} // next
} // fi
} // next