# brisk-admin

> Grant admin access to a Brisk application

Latest version **0.3.1** (published 2023-04-15) · 0 weekly downloads

## Install

```sh
npm install brisk-admin
pnpm add brisk-admin
yarn add brisk-admin
bun add brisk-admin
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2023-04-15 |
| First published | 2015-01-22 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.x.x |
| Dependencies | 7 |
| Unpacked size | 19.5 KB |
| Known vulnerabilities | 0 (+28 in 4 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | makesites |
| Maintainers | makesites |
| Keywords | brisk, admin, extension, makesites |

## Links

- npm: https://www.npmjs.com/package/brisk-admin
- Repository: https://github.com/brisk-modules/admin
- Homepage: http://github.com/brisk-modules/admin
- Issues: https://github.com/brisk-modules/admin/issues
- npm.io page: https://npm.io/package/brisk-admin

## Dependencies (7)

- [hbs](https://npm.io/package/hbs.md) 4.0.4
- [async](https://npm.io/package/async.md) 3.0.1
- [brisk](https://npm.io/package/brisk.md) 1.x.x
- [bcrypt](https://npm.io/package/bcrypt.md) 5.1.0
- [nodemailer](https://npm.io/package/nodemailer.md) 6.2.1
- [underscore](https://npm.io/package/underscore.md) 1.9.1
- [nodemailer-ses-transport](https://npm.io/package/nodemailer-ses-transport.md) 1.5.1

## Recent versions

- 0.3.1 (latest) — 2023-04-15
- 0.3.0 — 2019-06-01
- 0.2.7 — 2018-09-08
- 0.2.6 — 2016-10-04
- 0.2.5 — 2015-05-16
- 0.2.4 — 2015-04-09
- 0.2.3 — 2015-04-08
- 0.2.2 — 2015-03-22
- 0.2.1 — 2015-03-14
- 0.2.0 — 2015-03-13
- 0.1.0 — 2015-01-22

## README

# Brisk: Admin

Grant admin access to an application running [Brisk](http://github.com/makesites/brisk/)


## Features

* Plug & play
* Role assignement


## Dependencies

* [Brisk](https://github.com/makesites/brisk)
* [Nodemailer](https://github.com/andris9/Nodemailer)
* [AWS SES](https://aws.amazon.com/ses/)


## Install

Using npm:
```
npm install brisk-admin
```


## Usage

Firstly, sessions need to be already activated in your applications, to allow admin login. Also your AWS credentials need to be loaded in the expected location:
```
req.site.config.api.aws
```

1. Create an admin model that extends the plugin's model
```
var Parent = require("brisk-admin").getModel("admin");

var model = Parent.extend({
	...
});

module.exports = model;

````

2. Initiate the admin middleware in the express config at ```/config/express.js```

```
...
default: {
	...
	use: {
		admin: false // the negative boolean will not execute the function or pass any setup options
		...
	}
	...
}
```

3. Extend your express & handlebars helpers with the ```brisk-admin``` helpers. For example:
```
var Main = require("brisk").getClass("main"),
	Admin = require("brisk-admin").getHelper("handlebars"),
	Parent = Main.inherit(Main, Admin);
```



## Credits

Initiated by [Makis Tracend](http://github.com/tracend)

Distributed through [Makesites](http://makesites.org/)

Released under the [MIT license](http://makesites.org/licenses/MIT)

---
_Source: https://npm.io/package/brisk-admin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
