const uid_t& uid,
int installationType)
{
- if (installationType == SM_APP_INSTALL_LOCAL && uid == creds.uid) {
+ if (installationType == SM_APP_INSTALL_LOCAL) {
if (!authenticate(creds, Config::PRIVILEGE_APPINST_USER)) {
LogError("Caller is not permitted to manage local applications");
return false;
}
+ if (uid != creds.uid && !authenticate(creds, Config::PRIVILEGE_USER_ADMIN)) {
+ LogError("Caller is not permitted to manage applications for other users");
+ return false;
+ }
} else {
if (!authenticate(creds, Config::PRIVILEGE_APPINST_ADMIN)) {
LogError("Caller is not permitted to manage global applications");
* Required privileges:
* - http://tizen.org/privilege/notexist (local installation)
* - http://tizen.org/privilege/notexist (global installation)
+ * - http://tizen.org/privilege/internal/usermanagement (local installation for other users)
*
* \param[in] Pointer handling app_inst_req structure
* \return API return code or error code: it would be
* using filled up app_inst_req data structure
*
* Required privileges:
- * - http://tizen.org/privilege/notexist (private uninstallation)
+ * - http://tizen.org/privilege/notexist (local uninstallation)
* - http://tizen.org/privilege/notexist (global uninstallation)
+ * - http://tizen.org/privilege/internal/usermanagement (local uninstallation for other users)
*
* \param[in] Pointer handling app_inst_req structure
* \return API return code or error code
* filled up path_req data structure.
*
* Required privileges:
- * - http://tizen.org/privilege/notexist (if uid is not set or set to current user's uid)
- * - http://tizen.org/privilege/notexist (if uid is set to some other user's uid)
+ * - http://tizen.org/privilege/notexist (local installation)
+ * - http://tizen.org/privilege/notexist (global installation)
+ * - http://tizen.org/privilege/internal/usermanagement (local installation for other users)
*
* \param[in] p_req Pointer handling path_req structure
*