Skip to content

Instantly share code, notes, and snippets.

View rajhim's full-sized avatar

Rajhim Shahi rajhim

  • kathmandu, Nepal
View GitHub Profile
@rajhim
rajhim / cookie.service.ts
Created July 8, 2019 09:02 — forked from greatb/cookie.service.ts
Injectable CookieService class for Angular2
@rajhim
rajhim / database.rules.json
Created February 5, 2019 06:07 — forked from codediodeio/database.rules.json
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@rajhim
rajhim / data-structure.js
Created January 7, 2019 16:34 — forked from sararob/data-structure.js
Role-based security in Firebase
/*
This example shows how you can use your data structure as a basis for
your Firebase security rules to implement role-based security. We store
each user by their Twitter uid, and use the following simplistic approach
for user roles:
0 - GUEST
10 - USER
20 - MODERATOR