{"record":{"id":"00e9a2d10e93dffd","repo":"theforeman/foreman","slug":"unauthorized-you-do-not-have-the-required-permiss-00e9a2","errorCode":null,"errorMessage":"Unauthorized. You do not have the required permission %s.","messagePattern":"Unauthorized\\. You do not have the required permission (.+?)\\.","errorType":"exception","errorClass":"GraphQL::ExecutionError","httpStatus":null,"severity":"error","filePath":"app/graphql/mutations/settings/update.rb","lineNumber":54,"sourceCode":"        User.as(context[:current_user]) do\n          errors = if record.save\n                     []\n                   else\n                     map_errors_to_path(record)\n                   end\n          {\n            :setting => definition,\n            :errors => errors,\n          }\n        end\n      end\n\n      private\n\n      def authorize!\n        return if context[:current_user]&.can?(:edit_settings)\n\n        raise GraphQL::ExecutionError.new(\n          _('Unauthorized. You do not have the required permission %s.') % 'edit_settings'\n        )\n      end\n    end\n  end\nend\n","sourceCodeStart":36,"sourceCodeEnd":61,"githubUrl":"https://github.com/theforeman/foreman/blob/6b05625475cfe6aac31a88f8c8ee6e62e4efe620/app/graphql/mutations/settings/update.rb#L36-L61","documentation":"Error \"Unauthorized. You do not have the required permission %s.\" thrown in theforeman/foreman.","triggerScenarios":"Thrown at app/graphql/mutations/settings/update.rb:54 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6b05625475cfe6aac31a88f8c8ee6e62e4efe620","analyzedAt":"2026-08-23T17:46:34.094Z","schemaVersion":2},"datasetVersion":"2026-08-23T21:17:23.414Z"}