Bug 1317791 - "oc create namespace" should be moved to "oc adm"
Summary: "oc create namespace" should be moved to "oc adm"
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-15 08:41 UTC by Wei Sun
Modified: 2016-06-28 17:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-28 17:38:31 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Wei Sun 2016-03-15 08:41:29 UTC
Description of problem:
A regular user could not create namespace,but "oc create namespace" has no any prompt that the command is administrative command.When a regular user uses this command,the user gets "User "wsunview" cannot create namespaces at the cluster scope"

Version-Release number of selected component (if applicable):
oc v3.2.0.3
kubernetes v1.2.0-origin-41-g91d3e75

How reproducible:
Always

Steps to Reproduce:
1.Use a regular user to run `oc create namespace wsun-test `
2.oc create namespace -h
3.

Actual results:
1.$ oc create namespace wsun-test 
Error from server: User "wsunview" cannot create namespaces at the cluster scope
2.No any prompt this command is for cluster admin 

Expected results:
The command should be moved to "oc adm"

Additional info:
$ oc adm -h
Administrative Commands

Commands for managing a cluster are exposed here. Many administrative
actions involve interaction with the command-line client as well.

Comment 1 Fabiano Franz 2016-06-28 17:38:31 UTC
`oc create` is meant to be used as a CLI way of creating any kind of resource, without any previous knowledge of user permissions. Think of it as a more user-friendly, a "flags+arguments" way of creating what you could otherwise create from a json or yaml file in 'oc create -f'. So it's ok to any resource kind there, and throw permission errors when the given user doesn't have access to it.


Note You need to log in before you can comment on or make changes to this bug.