From 1c92b1f9f85e19140d6ec61d1f29a673fbe91b17 Mon Sep 17 00:00:00 2001 From: tangjie02 Date: Thu, 5 Jan 2023 16:17:02 +0800 Subject: [PATCH] Fix the polkit action for ChangeAccountType. Signed-off-by: tangjie02 --- ...-the-polkit-action-for-ChangeAccount.patch | 31 +++++++++++++++++++ kiran-cc-daemon.spec | 6 +++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0001-fix-accounts-Fix-the-polkit-action-for-ChangeAccount.patch diff --git a/0001-fix-accounts-Fix-the-polkit-action-for-ChangeAccount.patch b/0001-fix-accounts-Fix-the-polkit-action-for-ChangeAccount.patch new file mode 100644 index 0000000..5806e2b --- /dev/null +++ b/0001-fix-accounts-Fix-the-polkit-action-for-ChangeAccount.patch @@ -0,0 +1,31 @@ +From 710d49ecfafa7782b9121676394e17a87e7f6bbb Mon Sep 17 00:00:00 2001 +From: tangjie02 +Date: Thu, 5 Jan 2023 15:46:54 +0800 +Subject: [PATCH] fix(accounts): Fix the polkit action for ChangeAccountType. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 将修改账户类型的dbus接口的改为需要管理员权限认证 + +Signed-off-by: tangjie02 +--- + plugins/accounts/user.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/accounts/user.cpp b/plugins/accounts/user.cpp +index c8abf37..b0ad852 100644 +--- a/plugins/accounts/user.cpp ++++ b/plugins/accounts/user.cpp +@@ -260,7 +260,7 @@ USER_SET_ONE_PROP_AUTH(SetHomeDirectory, change_home_dir_authorized_cb, AUTH_USE + USER_SET_ONE_PROP_AUTH(SetShell, change_shell_authorized_cb, AUTH_USER_ADMIN, const Glib::ustring &); + USER_SET_ONE_PROP_AUTH(SetIconFile, change_icon_file_authorized_cb, AUTH_CHANGE_OWN_USER_DATA, const Glib::ustring &); + USER_SET_ONE_PROP_AUTH(SetLocked, change_locked_authorized_cb, AUTH_USER_ADMIN, bool); +-USER_SET_ONE_PROP_AUTH(SetAccountType, change_account_type_authorized_cb, AUTH_CHANGE_OWN_USER_DATA, int32_t); ++USER_SET_ONE_PROP_AUTH(SetAccountType, change_account_type_authorized_cb, AUTH_USER_ADMIN, int32_t); + USER_SET_ONE_PROP_AUTH(SetPasswordMode, change_password_mode_authorized_cb, AUTH_CHANGE_OWN_USER_DATA, int32_t); + USER_SET_TWO_PROP_AUTH(SetPassword, change_password_authorized_cb, AUTH_CHANGE_OWN_PASSWORD, const Glib::ustring &, const Glib::ustring &); + USER_SET_TWO_PROP_AUTH(SetPasswordByPasswd, change_password_by_passwd_authorized_cb, AUTH_CHANGE_OWN_PASSWORD, const Glib::ustring &, const Glib::ustring &); +-- +2.36.1 + diff --git a/kiran-cc-daemon.spec b/kiran-cc-daemon.spec index 7964263..343054b 100644 --- a/kiran-cc-daemon.spec +++ b/kiran-cc-daemon.spec @@ -1,6 +1,6 @@ Name: kiran-cc-daemon Version: 2.4.0 -Release: 4 +Release: 5 Summary: DBus daemon for Kiran Desktop License: MulanPSL-2.0 @@ -9,6 +9,7 @@ Source0: %{name}-%{version}.tar.gz Patch0001: 0001-feature-timedate-Delete-timedate_i.h-file.patch Patch0002: 0001-fix-passwd-Fix-password-policy-inconsistencies.patch Patch0003: 0001-feature-backlight-Support-brightness-modification-by.patch +Patch0004: 0001-fix-accounts-Fix-the-polkit-action-for-ChangeAccount.patch BuildRequires: cmake >= 3.2 @@ -154,6 +155,9 @@ glib-compile-schemas /usr/share/glib-2.0/schemas &> /dev/nulls || : %{_libdir}/pkgconfig/kiran-cc-daemon.pc %changelog +* Thu Jan 05 2023 tangjie02 - 2.4.0-5 +- KYOS-B: Fix the polkit action for ChangeAccountType. + * Wed Dec 07 2022 tangjie02 - 2.4.0-4 - KYOS-F: Support brightness modification by changing gamma value.