tamentis / cartman

Command line Trac tools
http://tamentis.com/projects/cartman/
ISC License
22 stars 10 forks source link

Trac not working with the Account Manager Plugin #18

Closed martsa1 closed 8 years ago

martsa1 commented 8 years ago

Hi Folks,

First off, thank you for putting this tool together, it looks awesome!

I'm not sure if I'm doing something stupid, but any combination of cm commands each result in a permissions error: error: WIKI_VIEW privileges are required to perform this operation on WikiStart. You don't have the required permissions.

My ~/.cartman/config file looks like this:

[trac]
base_url = http://trac.local/trac
username = sam.martin
password = ******

My trac instance is reachable at http://trac/trac (Don't ask why its doubled up like that, long story!) and I have trac_admin permissions.

Is there any way I can get some debug output to figure out what is going on further?

Thanks in advance,

martsa1 commented 8 years ago

Pulled in latest changes and now get subtle variations on the above, different commands report back different permissions errors, but nothing ever succeeds. Explicitly adding the permissions reported by cm doesn't seem to make any difference...

cm properties
error: TICKET_VIEW privileges are required to perform this operation. You don't have the required permissions.
cm reports
error: REPORT_VIEW privileges are required to perform this operation. You don't have the required permissions.
cm report 7
error: REPORT_VIEW privileges are required to perform this operation on report:7. You don't have the required permissions.
cm search trac
error: SEARCH_VIEW privileges are required to perform this operation. You don't have the required permissions.
cm new
error: TICKET_VIEW privileges are required to perform this operation. You don't have the required permissions.
etc.
tamentis commented 8 years ago

How do you authenticate with Trac normally? We have two types of authentication available, you may have to try the other type (auth_type = digest).

martsa1 commented 8 years ago

Ah, that might be it, all the accounts on this trac environment are configured to use the Account_Manager plugin, which provides an authentication form, rather than using HTTP Authentication. I guess that might be it?

edit: I tried using that but it didn't help

tamentis commented 8 years ago

Yes, that's exactly it. I have never used this plugin but it seems rather large and popular, I might try to add it as another authentication method.

martsa1 commented 8 years ago

Awesome. Let me know if I can be of help testing.

tamentis commented 8 years ago

Would you mind trying master, I tried to install AccountManager locally and it seems to work, you need to use the following authentication setting in your cartman config:

auth_type = acctmgr
martsa1 commented 8 years ago

Looks like it works for me!

I'll do a bit more testing next time I'm in the office, but right now I can do various read only operations.

Nice work!

martsa1 commented 8 years ago

Did a bit more testing today, write access works great too.

Thanks!