--- title: モデルにおけるユーザーの権限について tags: 考察 --- # 観点 任意のユーザーはユーザに紐付けられたデータにしかアクセスできないようにしたい レプリケーションできるか フロントエンド側で必要とされるトークンの持つ権限は最大でどのくらいになるか --- strapi ソースコードを編集すればできる? `ctx.current.user` https://blog.strapi.io/admin-permissions/ --- firestore firestore authenticationって仕組みを使えばユーザーが自分の作ったものに対してのみアクセスができるといったような特性のデータを作れそう 基本的にはuserのsigninはproviderなどを使う必要がありそう カスタム認証を用いるとすでにあるアプリケーションの認証を通るとトークンとして権限がもらえるという方法がありそう https://firebase.google.com/docs/auth/?hl=ja https://qiita.com/KarageAgeta/items/0996c8f0ea219c284dbd https://firebase.google.com/docs/firestore/solutions/role-based-access?hl=ja https://medium.com/google-cloud-jp/firestore1-a62405a7cd82 https://qiita.com/KarageAgeta/items/0996c8f0ea219c284dbd same id https://qiita.com/1amageek/items/d606dcee9fbcf21eeec6#-same-id https://qiita.com/1amageek/items/d606dcee9fbcf21eeec6#-same-id https://medium.com/google-cloud-jp/firestore2-920ac799345c gatsby-source firebase https://www.gatsbyjs.org/packages/gatsby-source-firebase/ https://www.gatsbyjs.org/packages/gatsby-source-firestore/ --- rails 認証ライブラリ device,omniauth,authlogic https://www.ruby-toolbox.com/categories/rails_authentication 権限管理ライブラリ cancancan,rolify,pundit