1. Sebastian Sebastian
  2. scm-manager
  3. Issues

Issues

Issue #470 resolved

Allow group names with spaces

Patrik Husfloen
created an issue

Our AD groups have spaces in their name, so we cannot currently assign read/write rights on groups themselves because we cannot add them.

We worked around it by creating additional groups in AD without spaces that refer to the original ones but it would be nice if it was supported out of the box.

Comments (12)

  1. Patrik Husfloen reporter
    1. Add a group with a space in the name.
    2. Try to delete said group

    Expected result: group is deleted

    Actual result: the REST endpoint returns a 400 bad request on the "DELETE" done against the resource. This results in an error dialog being shown to the user.

    Environment: Windows Server 2008 R2 hosted in IIS using Helicon Zoo

  2. Patrik Husfloen reporter

    It happens on GET as well though, when I click a group name with a space I get 400 bad request on the following URL:

    http://git.server.com/api/rest/security/permission/group/ACL%20Developers.json

    Does SCM-manager log incoming requests somewhere? Then I could compare IIS and Helicon logs to the SCM-Manager logs, see if something rejects it before passing it on.

    Edit:

    If the group has no space in it, I can delete it without issue, so I don't think something is blocking DELETEs outright either.

  3. Sebastian Sebastian repo owner

    It is possible that you test it without the iis? Could you bypass the proxy? Or start a standalone version of scm-manager? Perhaps the issue is related to #444.

    You can enable request logging. Open the conf/server-config.xml and change the following block from:

      <!-- request logging -->
      <!--
      <Ref id="RequestLog">
        <Set name="requestLog">
          <New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
            <Arg><SystemProperty name="basedir" default="."/>/var/log/yyyy_mm_dd.request.log</Arg>
            <Set name="retainDays">90</Set>
            <Set name="append">true</Set>
            <Set name="extended">false</Set>
            <Set name="LogTimeZone">GMT</Set>
           </New>
        </Set>
      </Ref>
      -->
    

    to:

      <!-- request logging -->
      <Ref id="RequestLog">
        <Set name="requestLog">
          <New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
            <Arg><SystemProperty name="basedir" default="."/>/var/log/yyyy_mm_dd.request.log</Arg>
            <Set name="retainDays">90</Set>
            <Set name="append">true</Set>
            <Set name="extended">false</Set>
            <Set name="LogTimeZone">GMT</Set>
           </New>
        </Set>
      </Ref>
    

    After that search the following block:

      <Set name="handler">
        <New class="org.eclipse.jetty.server.handler.HandlerCollection">
          <Set name="handlers">
            <Array type="org.eclipse.jetty.server.Handler">
              <Item>
                <Ref id="scm-webapp" />
              </Item>
              <Item>
                <Ref id="docroot" />
              </Item>
              <!--
              <Item>
                <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"/>
              </Item>
              -->
            </Array>
          </Set>
        </New>
      </Set>
    

    and replace it with:

      <Set name="handler">
        <New class="org.eclipse.jetty.server.handler.HandlerCollection">
          <Set name="handlers">
            <Array type="org.eclipse.jetty.server.Handler">
              <Item>
                <Ref id="scm-webapp" />
              </Item>
              <Item>
                <Ref id="docroot" />
              </Item>
              <Item>
                <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"/>
              </Item>
            </Array>
          </Set>
        </New>
      </Set>
    
  4. Log in to comment