npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

delete-permission-google-script

v1.0.2

Published

script for deleting permissions by email from google docs,tables etc

Downloads

14

Readme

Script for remove permissions

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Russian:

Для работы скрипта необходимо выполнить следующие действия:

Создать проект в Google Cloud Console и включить в нем Google Drive API.

Создать учетную запись сервисного аккаунта, создать в разделе "manage keys" ключ и скачать файл с ключом доступа.

поместить ключ доступа по пути keys//adminKey.json и переименовать в соответствующее название

Дать сервисному аккаунту доступ к диску, будь то папка или конкретный файл, для чего во вкладке поделиться доступом по email вести email этого сервисного аккаунта, который можно найти в его настройках в Google Cloud Console

Установить библиотеку googleapis: npm install googleapis.

Запустить скрипт: node deletePermission.js с нужными аргументами.

При запуске скрипта в аргументах консоли необходимо ввести ссылку на ресурс и email пользователя, для которого нужно удалить пермишн. Если указанный пользователь не имеет доступа к ресурсу, скрипт выведет соответствующее сообщение. При успешном выполнении скрипт выведет сообщение об успешном удалении пермишна.

node delete_permission.js https://docs.google.com/spreadsheets/d/1Q5mMX48koyy2cMPXFe_4U_h4-ddMSfrnC-_wi8vDtTM/edit?usp=drive_link [email protected]

для работы в качестве npm модуля:

повторить вышеуказанные действия

установить модуль:

npm install delete-permissions-google-script

подключить библиотеку и использовать функцию:

const delete_permission = require('delete-permissions-google-script')
delete_permission(targetUrl, emailAdress)

English:

For the script to work, you need permission to act:

Create a project in the Google Cloud Console and enable the Google Drive API in it.

Create a service account, create a key in the "manage keys" section and download the file with the access key.

Give a service account access to a drive, whether it be a folder or a specific file, to do this, enable email sharing to keep the email of this service account, which can be found in the Google Cloud Console

Install googleapis library: npm install googleapis.

Run script: node deletePermission.js with required arguments.

When resolving the script in the console arguments, you must enter the permission to the resource and the email address of the user for whom you want to remove the permission. If the specified user does not have access to the resource, the script will display the associated message. Upon successful execution, the script will display a message about the successful removal of the permission.

node delete_permission.js https://docs.google.com/spreadsheets/d/1Q5mMX48koyy2cMPXFe_4U_h4-ddMSfrnC-_wi8vDtTM/edit?usp=drive_link [email protected]

to work as an npm module:

repeat the above steps

install module:

npm install delete-permissions-google-script

connect the library and use the function:

const delete_permission = require('delete-permissions-google-script')
delete_permission(targetUrl, emailAddress)

Authors

  • Shilko Vladimir

Visit https://developers.google.com for more information

License

No license, just deal with it

Acknowledgments

  • Hat tip to anyone whose code was used
  • Inspiration
  • etc