jwulf / press-star

A node-based implementation of the popular Death Star authoring environment for PressGang / Docbook
4 stars 1 forks source link

Replace Identity challenge with bootstrap modal #14

Closed jwulf closed 8 years ago

jwulf commented 11 years ago

http://twitter.github.io/bootstrap/javascript.html#modals

jwulf commented 11 years ago

And add "Don't have an account? Create one here"

lnewson: {"name": ""} [08:54am] lnewson: ^ JSON you should need to send [08:54am] lnewson: you might want to add "description" and add a name or email [08:54am] lnewson: oops forgot configuredParameters [08:54am] lnewson: so maybe: [08:55am] lnewson: {"name": "jblogg", "description": "Joe Blogg", "configuredParameters": ["name", "description"]} [08:55am] lnewson: htttp://skynet.usersys.redhat.com:8080/seam/resource/rest/1/user/create/json/

lnewson commented 11 years ago

Below should be correct and all you need to add an assigned writer. You'll need to replace <USERNAME>, <FIRSTNAME>, <SURNAME> and <EMAIL>

URL:

POST <SERVER_URL>/1/tag/create/json

Formatted JSON Request:

{
  "name":"<USERNAME>",
  "configuredParameters": ["categories", "properties", "name"],
  "categories":
  {
    "items": 
      [
        {
          "item": {"id": "12"},
          "state": "1"
        }
      ]
  },
  "properties": 
  {
    "items": 
      [
        {
          "item": {"id": "1", "value": "<FIRSTNAME>", "configuredParameters": ["value"]},
          "state": "1"
        },
        {
          "item": {"id": "2", "value": "<SURNAME>", "configuredParameters": ["value"]},
          "state": "1"
        },
        {
          "item": {"id": "3", "value": "<EMAIL>", "configuredParameters": ["value"]},
          "state": "1"
        }
      ]
  }
}

Unformatted JSON Request:

{"name":"<USERNAME>", "configuredParameters": ["categories", "properties", "name"], "categories": {"items": [{"item": {"id": "12"}, "state": "1"}]}, "properties": {"items": [{"item": {"id": "1", "value": "<FIRSTNAME>", "configuredParameters": ["value"]}, "state": "1"}, {"item": {"id": "2", "value": "<SURNAME>", "configuredParameters": ["value"]}, "state": "1"}, {"item": {"id": "3", "value": "<EMAIL>", "configuredParameters": ["value"]}, "state": "1"}]}}
jwulf commented 11 years ago

https://github.com/jwulf/press-star/commit/f3ed30311f343ac8b31508dfaab16196b2190499

Done. Just have to create the assigned writer tag now, and it's golden.

jwulf commented 11 years ago

Here's what a succcessful assigned writer request looked like in PG:

{"revisions":null, "name":"jbourne", "description":null, "categories":{"items":[{"item":{"relationshipId":null, "relationshipSort":0, "revisions":null, "name":null, "description":null, "mutuallyExclusive":false, "sort":null, "tags":null, "selfLink":null, "editLink":null, "deleteLink":null, "addLink":null, "id":12, "revision":null, "configuredParameters":["tagCategorySort"], "expand":null, "logDetails":null}, "state":1}], "size":null, "expand":null, "startExpandIndex":null, "endExpandIndex":null}, "parentTags":null, "childTags":null, "projects":{"items":[], "size":null, "expand":null, "startExpandIndex":null, "endExpandIndex":null}, "properties":{"items":[], "size":null, "expand":null, "startExpandIndex":null, "endExpandIndex":null}, "selfLink":null, "editLink":null, "deleteLink":null, "addLink":null, "id":-1, "revision":null, "configuredParameters":["description","name","properties","categories","projects"], "expand":null, "logDetails":null}

lnewson commented 11 years ago

Sorry I used the wrong ID on the Assigned Writer category (it should have been 12 not 4). Also your request doesn't set the "First Name", "Last Name" or "Email" extended properties, so it's not right either.

jwulf commented 8 years ago

Closing.