Bug #734
CLI doesn't translate the resource names for regular users
Status: | Closed | Start date: | 07/18/2011 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Daniel Molina | % Done: | 100% | |
Category: | CLI | |||
Target version: | Release 3.0 | |||
Resolution: | fixed | Pull request: | ||
Affected Versions: |
Description
The CLI can translate a name to its numeric ID, but that works only for oneadmin.
In one_helper.rb:187, the used flag to retrieve the elements is Pool::INFO_ALL. It should be Pool::INFO_GROUP, as it is more likely that the user will have only rights to use that one. INFO_ALL should be used as a second try, in case the name is not found with the INFO_GROUP call.
It should also hide the authorization errors and just inform the user that the name couldn't be found, and that he should use the numeric ID instead.
$ onetemplate show a_name [TemplatePoolInfo] User [1] not authorized to perform action on virtual machine template. command show: argument 0 must be one of templateid
Associated revisions
bug #734: Fix handling nil arguments and no arguments
bug #734: Translate resource names for regular users
History
#1 Updated by Ruben S. Montero almost 10 years ago
- Assignee changed from Javi Fontan to Carlos Martín
- Target version set to Release 3.0
#2 Updated by Daniel Molina almost 10 years ago
- Assignee changed from Carlos Martín to Daniel Molina
- % Done changed from 0 to 100
- Resolution set to fixed
#3 Updated by Ruben S. Montero almost 10 years ago
- Status changed from New to Closed