Merge lp:~vikoadi/pantheon-files/administrator-pkexec into lp:~elementary-apps/pantheon-files/trunk

Proposed by Viko Adi Rahmawan
Status: Merged
Approved by: David Gomes
Approved revision: 1587
Merged at revision: 1599
Proposed branch: lp:~vikoadi/pantheon-files/administrator-pkexec
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 68 lines (+29/-3)
4 files modified
data/CMakeLists.txt (+5/-1)
data/net.launchpad.pantheon-files.policy.cmake (+20/-0)
data/pantheon-files-pkexec.cmake (+2/-0)
data/pantheon-files.desktop.in (+2/-2)
To merge this branch: bzr merge lp:~vikoadi/pantheon-files/administrator-pkexec
Reviewer Review Type Date Requested Status
David Gomes (community) Approve
Danielle Foré ux Approve
elementary Apps team Pending
Review via email: mp+235662@code.launchpad.net

Commit message

* add pantheon-files-pkexec wrapper for pkexec pantheon-files
* add pantheon-files .policy for polkit authentication
* call pantheon-files-pkexec instead off gksu from .desktop

Description of the change

* add pantheon-files-pkexec wrapper for pkexec pantheon-files
* add pantheon-files .policy for polkit authentication
* call pantheon-files-pkexec instead off gksu from .desktop

To post a comment you must log in.
Revision history for this message
Danielle Foré (danrabbit) wrote :

Works here!

review: Approve (ux)
Revision history for this message
David Gomes (davidgomes) wrote :

Approving pkexec usage (code).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/CMakeLists.txt'
2--- data/CMakeLists.txt 2014-08-05 18:42:18 +0000
3+++ data/CMakeLists.txt 2014-09-23 15:28:57 +0000
4@@ -1,6 +1,10 @@
5 configure_file(pantheon-files.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files.desktop)
6 configure_file(pantheon-files.service.cmake ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files.service)
7+configure_file(pantheon-files-pkexec.cmake ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files-pkexec)
8+configure_file(net.launchpad.pantheon-files.policy.cmake ${CMAKE_CURRENT_BINARY_DIR}/net.launchpad.pantheon-files.policy)
9 install (FILES ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files.desktop DESTINATION share/applications)
10 install (FILES ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files.service DESTINATION share/dbus-1/services/)
11+install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pantheon-files-pkexec DESTINATION bin)
12+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/net.launchpad.pantheon-files.policy DESTINATION share/polkit-1/actions/)
13 add_subdirectory (icons)
14-add_subdirectory (schemas)
15+add_subdirectory (schemas)
16\ No newline at end of file
17
18=== added file 'data/net.launchpad.pantheon-files.policy.cmake'
19--- data/net.launchpad.pantheon-files.policy.cmake 1970-01-01 00:00:00 +0000
20+++ data/net.launchpad.pantheon-files.policy.cmake 2014-09-23 15:28:57 +0000
21@@ -0,0 +1,20 @@
22+<?xml version="1.0" encoding="UTF-8"?>
23+<!DOCTYPE policyconfig PUBLIC
24+ "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
25+ "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
26+<policyconfig>
27+ <vendor>elementary</vendor>
28+ <vendor_url>http://launchpad.net/pantheon-files</vendor_url>
29+ <icon_name>system-file-manager</icon_name>
30+ <action id="org.freedesktop.policykit.pkexec.pantheon-files">
31+ <description>Run Pantheon Files as Administrator</description>
32+ <message>Authentication is required to run Files as Administrator</message>
33+ <defaults>
34+ <allow_any>auth_admin</allow_any>
35+ <allow_inactive>auth_admin</allow_inactive>
36+ <allow_active>auth_admin</allow_active>
37+ </defaults>
38+ <annotate key="org.freedesktop.policykit.exec.path">@CMAKE_INSTALL_PREFIX@/bin/pantheon-files</annotate>
39+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
40+ </action>
41+</policyconfig>
42\ No newline at end of file
43
44=== added file 'data/pantheon-files-pkexec.cmake'
45--- data/pantheon-files-pkexec.cmake 1970-01-01 00:00:00 +0000
46+++ data/pantheon-files-pkexec.cmake 2014-09-23 15:28:57 +0000
47@@ -0,0 +1,2 @@
48+#!/bin/sh
49+pkexec "@CMAKE_INSTALL_PREFIX@/bin/pantheon-files"
50\ No newline at end of file
51
52=== modified file 'data/pantheon-files.desktop.in'
53--- data/pantheon-files.desktop.in 2014-05-26 10:35:33 +0000
54+++ data/pantheon-files.desktop.in 2014-09-23 15:28:57 +0000
55@@ -26,10 +26,10 @@
56
57 [Root Shortcut Group]
58 Name=New Window As _Administrator
59-Exec=gksu pantheon-files
60+Exec=pantheon-files-pkexec
61 TargetEnvironment=Unity
62
63 [AboutDialog Shortcut Group]
64 Name=About _Files
65 Exec=pantheon-files --about
66-TargetEnvironment=Unity
67+TargetEnvironment=Unity
68\ No newline at end of file

Subscribers

People subscribed via source and target branches

to all changes: