Skip to content

Commit a0a2742

Browse files
committed
feat: Publish 1.0.0 stable release (#66)
BREAKING CHANGE: Promoting to 1.0.0 stable release
1 parent 4de6c17 commit a0a2742

3 files changed

Lines changed: 42 additions & 5 deletions

File tree

README.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
11
# dart-casbin
22

3-
An authorization library that supports access control models like ACL, RBAC, ABAC in Dart.
4-
3+
[![pub package](https://img.shields.io/pub/v/casbin.svg)](https://pub.dev/packages/casbin)
4+
[![Dart CI](https://github.com/casbin/dart-casbin/workflows/Dart%20CI/badge.svg)](https://github.com/casbin/dart-casbin/actions)
55
[![Discord](https://img.shields.io/discord/1022748306096537660?logo=discord&label=discord&color=5865F2)](https://discord.gg/S5UjpzGZjN)
6+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
7+
8+
An authorization library that supports access control models like ACL, RBAC, ABAC in Dart.
69

710
**News**: Are you still worried about how to write the correct Casbin policy? `Casbin online editor` is coming to help! Try it at: http://casbin.org/editor/
811

912
![casbin Logo](casbin-logo.png)
1013

14+
## Table of Contents
15+
16+
- [Installation](#installation)
17+
- [Get Started](#get-started)
18+
- [Supported Models](#supported-models)
19+
- [How It Works](#how-it-works)
20+
- [Features](#features)
21+
- [Documentation](#documentation)
22+
- [Examples](#examples)
23+
- [License](#license)
24+
1125
## All the languages supported by Casbin:
1226

1327
| [![golang](https://casbin.org/img/langs/golang.png)](https://github.com/casbin/casbin) | [![java](https://casbin.org/img/langs/java.png)](https://github.com/casbin/jcasbin) | [![nodejs](https://casbin.org/img/langs/nodejs.png)](https://github.com/casbin/node-casbin) | [![php](https://casbin.org/img/langs/php.png)](https://github.com/php-casbin/php-casbin) |
@@ -98,11 +112,34 @@ You can also use the online editor (https://casbin.org/editor/) to write your Ca
98112

99113
https://casbin.org/docs/tutorials
100114

115+
## Installation
116+
117+
Add this to your package's `pubspec.yaml` file:
118+
119+
```yaml
120+
dependencies:
121+
casbin: ^1.0.0
122+
```
123+
124+
Then run:
125+
126+
```bash
127+
dart pub get
128+
```
129+
130+
Or with Flutter:
131+
132+
```bash
133+
flutter pub get
134+
```
135+
101136
## Get started
102137

103138
1. New a Casbin enforcer with a model file and a policy file:
104139

105140
```dart
141+
import 'package:casbin/casbin.dart';
142+
106143
var e = Enforcer.fromModelPathAndPolicyFile('path/to/model.conf', 'path/to/policy.csv');
107144
```
108145

analysis_options.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Defines a default set of lint rules enforced for
22
# projects at Google. For details and rationale,
3-
# see https://github.com/dart-lang/pedantic#enabled-lints.
4-
include: package:pedantic/analysis_options.yaml
3+
# see https://github.com/dart-lang/lints#lints
4+
include: package:lints/recommended.yaml
55

66
# For lint rules and documentation, see http://dart-lang.github.io/linter/lints.
77
# Uncomment to specify additional rules.

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ dependencies:
1515
quiver: ^3.0.1
1616

1717
dev_dependencies:
18-
pedantic: ^1.11.0
18+
lints: ^5.1.0
1919
test: ^1.16.7

0 commit comments

Comments
 (0)