Github user nikhilkh commented on a diff in the pull request:
https://github.com/apache/cordova-paramedic/pull/4#discussion_r59644267
--- Diff: lib/ParamedicPermissions.js ---
@@ -0,0 +1,60 @@
+#!/usr/bin/env node
+
+/* jshint node: true */
+var path = require('path');
+var fs = require('fs');
+var shelljs = require("shelljs");
+var logger = require('./utils').logger;
+
+function ParamedicPermissions(appName, simulatorsFolder, dbPath) {
+ this.appName = appName;
+ this.simulatorsFolder = simulatorsFolder;
+ this.dbPath = dbPath;
+}
+
+ParamedicPermissions.prototype.updatePermissions = function(serviceList){
+ var self = this;
+ this.getDirectories(self.simulatorsFolder).forEach(function(simFolder){
+ var destinationTCCFile = path.join(self.simulatorsFolder,
simFolder, '/data/Library/TCC/TCC.db');
+
+ //Check if the simFolder has TCC.db file in it
+ if(self.doesFileExist(destinationTCCFile)) {
+ var sqlite3Command_firstPart = 'sqlite3 ' +
destinationTCCFile;
+ var sqlite3Command_secondPart = ' "insert into
access(service, client, client_type, allowed, prompt_count, csreq) values(\'';
--- End diff --
Instead of copying a tcc db with permissions - consider copying empty and
insert permissions into it - that helps in configuring permissions only in one
place.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]