Skip to content

Developer documentation for designing feature privileges#166716

Merged
SiddharthMantri merged 27 commits intoelastic:mainfrom
SiddharthMantri:feature-control-example-plugin
Sep 27, 2023
Merged

Developer documentation for designing feature privileges#166716
SiddharthMantri merged 27 commits intoelastic:mainfrom
SiddharthMantri:feature-control-example-plugin

Conversation

@SiddharthMantri
Copy link
Copy Markdown
Contributor

@SiddharthMantri SiddharthMantri commented Sep 19, 2023

Summary

Closes #162263

Introduces a new Feature Privileges section to the developer documentation. The documentation includes a tutorial on how to control access to features of plugin being developed. Introduces a few sections:

  • Controlling access to UI features
  • Controlling access to server side APIs
  • Documentation for configuration options

Testing

To build this locally, run ./scripts/dev_docs from a local checkout of this PR. A server will eventually start on http://localhost:3000 where you can preview the changes.

@SiddharthMantri SiddharthMantri added Team:Security Platform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t// docs documentation labels Sep 19, 2023
@SiddharthMantri SiddharthMantri marked this pull request as ready for review September 19, 2023 14:16
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-security (Team:Security)

@kc13greiner kc13greiner self-requested a review September 19, 2023 17:26
@SiddharthMantri SiddharthMantri added backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes labels Sep 20, 2023
@kc13greiner
Copy link
Copy Markdown
Contributor

@SiddharthMantri Im having trouble mapping the files to the menu in the docs, where should I be looking?
Screenshot 2023-09-20 at 10 14 03 AM

@SiddharthMantri
Copy link
Copy Markdown
Contributor Author

@kc13greiner I missed adding the dev id to the dev_docs navigation json file. It should be available now

image

@kc13greiner
Copy link
Copy Markdown
Contributor

@SiddharthMantri

Please run node scripts/validate_next_docs --debug locally, I think you have a misconfigured image linked

Also I keep getting an error when trying to run ./scripts/dev_docs locally, are you seeing this?

@SiddharthMantri
Copy link
Copy Markdown
Contributor Author

@kc13greiner That's weird, I see no error on running the ./scripts/dev_docs.sh

image

I'm unable to run the command to validate the docs with this error:

image

However, i see the linked image correctly in the docs:

image

Copy link
Copy Markdown
Contributor

@kc13greiner kc13greiner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good so far!

Copy link
Copy Markdown
Contributor

@kc13greiner kc13greiner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

To do so, we need to modify the configuration object for our route to look like this:

```
public setup(core: CoreSetup, deps: FeatureControlExampleDeps) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: add ts so the syntax highlighting matches the above example

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@SiddharthMantri SiddharthMantri merged commit de0e1eb into elastic:main Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting docs release_note:skip Skip the PR/issue when compiling release notes Team:Security Platform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t// v8.11.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Developer documentation for designing feature privileges

5 participants