Re: KeyError in webaccessadmin.py for accessing roles

2013-12-10 Thread Ferran Jorba
Hi Samuele,

[...]
 * 2013-12-10 13:15:20 - KeyError: 'categ'
 (access_control_admin.py:1522:acc_find_possible_actions)

 the categ additional param was introduced in:
 [...]
 commit ecdd5009c9cc9db8f333e3193ee94d08b93a2227
 Author: Samuele Kaplun samuele.kap...@cern.ch
 Date:   Fri Nov 13 11:35:24 2009 +0100

 WebAccess: added categ parameter to submit action
 
 * Improved WebSubmit and WebAccess to let the system administrator
   an option to configure submit authorizations based not only on
   doctype and act, but also on categ.  (closes: #12297)
 [...]

 there was a migration kit at that time available in the form of the
 old update-v0.99.1-tables and it's still there, although now you would
 trigger it via

 $ make update-v0.99.8-tables

probably you mean update-v0.99.7-tables.  I cannot find .8 in my system.
In .7 there is a INSERT INTO accARGUMENT(keyword,value) VALUES
('categ','*');.

 Have you run that update part?

Apparently I did, a while ago, and in all my instances:

 $ echo 'select * from accARGUMENT;' | dbexec
 [...]
 14 categ   *
 15 with_editor_rights  yes
 16 doctype TFG

However, I'm still receiving the same message.

 * 2013-12-10 15:59:48 - KeyError: 'categ' 
(access_control_admin.py:1522:acc_find_possible_actions)
 [...]
  uri: /admin/webaccess/webaccessadmin.py/showroledetails?id_role=4
 [...]
  File /home/ddd/lib/python/invenio/access_control_admin.py, line 1522, in 
acc_find_possible_actions
for row in arglistids[a][keywords[0]]:
KeyError: 'categ'

** Stack frame details

Frame acc_find_possible_actions in 
/home/ddd/lib/python/invenio/access_control_admin.py at line 1522
   a =  '1'
  arglistids =  {1: {'doctype': ['ARTCIE']}}
 res =  [1, 'doctype', 'ARTCIE']
res2 =  [[1, 'act', 'SBI'], [1, 'doctype', 'ARTCIE']]
res3 =  '[]'
res1 =  ((1, 'act', 'SBI'), (1, 'doctype', 'ARTCIE'))
   id_action =  '11L'
   value =  'ARTCIE'
   r =  'ARTCIE'
  kw =  'doctype'
  next_arglistid =  '[]'
keywords =  ['categ', 'doctype']
 id_role =  '4'

Frame roledetails in /home/ddd/lib/python/invenio/webaccessadmin_lib.py at line 
2243
---
  2240 actionshlp = acca.acc_get_role_actions(id_role)
  2241 actions = []
  2242 for (action_id, name, dummy) in actionshlp:
 2243 res = acca.acc_find_possible_actions(id_role, action_id)
  2244 if res:
  2245 authorization_details = tupletotable(header=res[0], 
tuple=res[1:])
  2246 else:


Still lost.  Thanks for your help,

Ferran


Re: Invenio v1.1.2 is released

2013-12-10 Thread Surendran Karippadath
Hello Ferran,

I have only the permanent IP address and lokavidya.in domain name.

You only need to add those alias to your DNS server.

How do I do that?

I could do that using the following dyndns domain names mapping to my IP.

lokavidyawiki.dyndns.org

and

wikilibrary.dyndns.org

The login is a problem and in submission only Article option appears.

ThanksRegards

Surendran



On Tue, Dec 10, 2013 at 1:10 PM, Ferran Jorba ferran.jo...@uab.cat wrote:

 Hello Surendran,

  I have a better feel of the stuff now. Both sites come up. The
  necessity for separate process names and virtual *:80 in name based
  hosting , I see.  The socket statement I do not understand. And the
  libreoffice integration is something I had problem with in 1.1.1
  too. I also find that login is not taking place. I am thinking of
  reinstalling Invenio.

 speaking about problems with sessions and logging into Invenio and
 MoinMoin, and the cookies going back and forth, and the clarity of the
 URLs, I would strongly suggest you to follow a different naming schema
 with your applications, and using something like wiki.lokavidya.in and
 library.lokavidya.in for each site.  As you know, this can perfectly be
 done using virtual hosts using a single IP address.  You only need to
 add those alias to your DNS server.  You can avoid problems now and in
 the future.  Both Invenio and MoinMoin Apache assume this canonical
 addresses, and your live would be easier.

 So, if you must reinstall Invenio, please think about this suggestion.

 Good luck,

 Ferran




-- 
Phone  :+91-20-27298293