permissions

Can Android apps request additinal permissions at runtime?

送分小仙女□ 提交于 2019-12-12 07:44:55
问题 I'm working on an app which contains some scripting support. The scripts executed by this app might require all sorts of permissions in the future, but it's difficult to predict which ones. Is there a way to request additional permissions at runtime (like iPhone apps sometimes do) instead of specifying them all in advance in AndroidManifest.xml? 回答1: According to the Android documentation: The permissions required by an application are declared statically in that application, so they can be

SQL Server - How to Grant Read Access to ALL databases to a Login?

一个人想着一个人 提交于 2019-12-12 07:39:57
问题 I need to give a new login read access to all 300 databases on a server. How can I accomplish this without checking 300 checkboxes in the user mapping area? 回答1: One way would be to Set "Results to Text" on the query menu in SSMS then execute the below. It doesn't actually make the change but generates a script for you to review and execute. SET NOCOUNT ON; DECLARE @user_name SYSNAME , @login_name SYSNAME; SELECT @user_name = 'user_name', @login_name = 'login_name' SELECT ' USE ' + QUOTENAME

App permissions on Android Marshmallow in PhoneGap

余生颓废 提交于 2019-12-12 07:26:57
问题 In Android Marshmallow we need to give access to Location, File etc separately in Apps. Is there any wan in PhoneGap app that I can check is permissions are available or not and prompt the user to provide the permissions. 回答1: UPDATE 16/02/2016 Phonegap Build now supports API 23 - hoooray! Or if you build locally, just Cordova/Phonegap CLI 6+ and you'll get cordova-android@5+ platform by default. ORIGINAL ANSWER Currently, this is certainly possible using the Cordova/Phonegap CLI, but

Why is the Google Play Store asking for permissions not in my Manifest?

与世无争的帅哥 提交于 2019-12-12 07:23:36
问题 I think this may have to do with the ManifestMerger. My AndroidManifest.xml permissions: <uses-permission android:name="android.permission.INTERNET" /> However the app is asking for: Identity Location Photos/Media/Files The manifest-merger-release.txt says: uses-permission#android.permission.WRITE_EXTERNAL_STORAGE ADDED from com.google.android.gms:play-services-maps:7.5.0:22:5 uses-permission#android.permission.ACCESS_COARSE_LOCATION ADDED from com.google.android.gms:play-services-maps:7.5.0

DirectoryEntry.NativeObject throws access denied for a user in Administrators group in windows 2008

别来无恙 提交于 2019-12-12 07:23:07
问题 I have a local user, which is member of Administrators local group. When I run this code: using System; using System.DirectoryServices; namespace nanttest { class Program { public static void Main(string[] args) { using(DirectoryEntry entry = new DirectoryEntry("IIS://localhost/W3SVC")) { object absobject = entry.NativeObject; Console.WriteLine("Name: {0}", entry.Name); } Console.Write("Press any key to continue . . . "); Console.ReadKey(true); } } } I receive: Unhandled Exception: System

Recursive Security Settings

本小妞迷上赌 提交于 2019-12-12 07:19:29
问题 I would like to apply a folder's Security Settings to all descendants in C#. Essentially, I would like to do the same thing as 'Replace all existing inheritable permissions on all descendants with inheritable permissions from this object' within 'Advanced Security Settings for [Folder]'. Are there any elegant ways to approach this? 回答1: After some quality time with google and MSDN I came up with the following bit of code. Seems to work just fine. static void Main(string[] args) {

File permissions in Android

我与影子孤独终老i 提交于 2019-12-12 07:18:43
问题 I'm here just to ask something maybe very simple, I'm working with Files, FileOutputStream and FileInputStream , But I just want to get/set a few props from the file, I mean, the owner the file, the permissions read/write, etc. Looking around I found the classes FileDescriptor and FilePermission but I don't have an idea of which I can use them, so I asking for some help about this; Actually I'm using the method setReadOnly() from the class File but that's now what I'm looking for. 回答1: There

EPERM, operation not permitted error, config store

瘦欲@ 提交于 2019-12-12 07:12:41
问题 I know this is a common error with node but all my troubleshooting techniques seem to be failing. Windows 7 (32-bit) Node@0.10.10 npm@1.2.25 This issue occurs when trying to run package commands like bower and yo (Yeoman). For my sanity, I am in a Node.js command prompt running as an Administrator when executing these commands. For example, here is the output for running this with yo : Error: EPERM, operation not permitted 'C:\Users\me\.config\configstore\insight-yo.yml' at Object.fs.openSync

Editing permissions of MediaWiki default namespaces

戏子无情 提交于 2019-12-12 06:32:45
问题 At the moment I'm trying to set some custom premissions for the "user:" Namespace, because normal users shouldn't be allowed to edit or create an article but setting up their personal article. Therefore they need the rights "edit" and "createpage", which i disabled for them. I've tried the default ID "2", you find it here: Link and setting up an own namespace, in my case it was "102". But both versions didn't worked, or was something wrong with my code? $wgGroupPermissions['user'] ['ns102

what is the best practice for Perl getting parent folder permissions while running on windows

蓝咒 提交于 2019-12-12 06:32:23
问题 I'm not much of a Perl developer but I need it to make triggers for perforce. So this is the background: I have a windows service that runs as admin that calls the Perl script on windows. The script needs to create a file on a network storage which is both configured to work with windows and UNIX permissions\security types. Since the user that is running the script is an admin user all folders and files that it creates under all directories are no inheriting the directories permissions but