mirror of
https://github.com/ansible/awx.git
synced 2026-04-04 17:55:06 -02:30
29
.eslintrc
29
.eslintrc
@@ -8,13 +8,11 @@
|
|||||||
"modules": true
|
"modules": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": ["airbnb", "prettier", "prettier/react"],
|
||||||
"airbnb"
|
|
||||||
],
|
|
||||||
"settings": {
|
"settings": {
|
||||||
'import/resolver': {
|
"import/resolver": {
|
||||||
webpack: {
|
"webpack": {
|
||||||
config: 'webpack.config.js'
|
"config": "webpack.config.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react": {
|
"react": {
|
||||||
@@ -33,16 +31,16 @@
|
|||||||
"camelcase": "off",
|
"camelcase": "off",
|
||||||
"arrow-parens": "off",
|
"arrow-parens": "off",
|
||||||
"comma-dangle": "off",
|
"comma-dangle": "off",
|
||||||
// https://github.com/benmosher/eslint-plugin-import/issues/479#issuecomment-252500896
|
"//": "https://github.com/benmosher/eslint-plugin-import/issues/479#issuecomment-252500896",
|
||||||
"import/no-extraneous-dependencies": "off",
|
"import/no-extraneous-dependencies": "off",
|
||||||
"indent": ["error", 2, {
|
"max-len": [
|
||||||
"SwitchCase": 1
|
"error",
|
||||||
}],
|
{
|
||||||
"max-len": ["error", {
|
"code": 100,
|
||||||
"code": 100,
|
"ignoreStrings": true,
|
||||||
"ignoreStrings": true,
|
"ignoreTemplateLiterals": true
|
||||||
"ignoreTemplateLiterals": true
|
}
|
||||||
}],
|
],
|
||||||
"no-continue": "off",
|
"no-continue": "off",
|
||||||
"no-debugger": "off",
|
"no-debugger": "off",
|
||||||
"no-mixed-operators": "off",
|
"no-mixed-operators": "off",
|
||||||
@@ -52,7 +50,6 @@
|
|||||||
"no-use-before-define": "off",
|
"no-use-before-define": "off",
|
||||||
"no-multiple-empty-lines": ["error", { "max": 1 }],
|
"no-multiple-empty-lines": ["error", { "max": 1 }],
|
||||||
"object-curly-newline": "off",
|
"object-curly-newline": "off",
|
||||||
"space-before-function-paren": ["error", "always"],
|
|
||||||
"no-trailing-spaces": ["error"],
|
"no-trailing-spaces": ["error"],
|
||||||
"no-unused-expressions": ["error", { "allowShortCircuit": true }],
|
"no-unused-expressions": ["error", { "allowShortCircuit": true }],
|
||||||
"react/prefer-stateless-function": "off",
|
"react/prefer-stateless-function": "off",
|
||||||
|
|||||||
8
.prettierrc
Normal file
8
.prettierrc
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"printWidth": 80,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"semi": true,
|
||||||
|
"singleQuote": true,
|
||||||
|
"trailingComma": "es5",
|
||||||
|
"bracketSpacing": true
|
||||||
|
}
|
||||||
64
package-lock.json
generated
64
package-lock.json
generated
@@ -6018,6 +6018,23 @@
|
|||||||
"object.entries": "^1.0.4"
|
"object.entries": "^1.0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"eslint-config-prettier": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-c17Aqiz5e8LEqoc/QPmYnaxQFAHTx2KlCZBPxXXjEMmNchOLnV/7j0HoPZuC+rL/tDC9bazUYOKJW9bOhftI/w==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"get-stdin": "^6.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"get-stdin": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
|
||||||
|
"integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"eslint-import-resolver-node": {
|
"eslint-import-resolver-node": {
|
||||||
"version": "0.3.2",
|
"version": "0.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz",
|
||||||
@@ -7157,8 +7174,7 @@
|
|||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"aproba": {
|
"aproba": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
@@ -7179,14 +7195,12 @@
|
|||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"balanced-match": "^1.0.0",
|
"balanced-match": "^1.0.0",
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
@@ -7201,20 +7215,17 @@
|
|||||||
"code-point-at": {
|
"code-point-at": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"concat-map": {
|
"concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"console-control-strings": {
|
"console-control-strings": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
@@ -7331,8 +7342,7 @@
|
|||||||
"inherits": {
|
"inherits": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"ini": {
|
"ini": {
|
||||||
"version": "1.3.5",
|
"version": "1.3.5",
|
||||||
@@ -7344,7 +7354,6 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"number-is-nan": "^1.0.0"
|
"number-is-nan": "^1.0.0"
|
||||||
}
|
}
|
||||||
@@ -7359,7 +7368,6 @@
|
|||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
}
|
}
|
||||||
@@ -7367,14 +7375,12 @@
|
|||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"minipass": {
|
"minipass": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.5",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"safe-buffer": "^5.1.2",
|
"safe-buffer": "^5.1.2",
|
||||||
"yallist": "^3.0.0"
|
"yallist": "^3.0.0"
|
||||||
@@ -7393,7 +7399,6 @@
|
|||||||
"version": "0.5.1",
|
"version": "0.5.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "0.0.8"
|
||||||
}
|
}
|
||||||
@@ -7474,8 +7479,7 @@
|
|||||||
"number-is-nan": {
|
"number-is-nan": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"object-assign": {
|
"object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
@@ -7487,7 +7491,6 @@
|
|||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
}
|
}
|
||||||
@@ -7573,8 +7576,7 @@
|
|||||||
"safe-buffer": {
|
"safe-buffer": {
|
||||||
"version": "5.1.2",
|
"version": "5.1.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"safer-buffer": {
|
"safer-buffer": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
@@ -7610,7 +7612,6 @@
|
|||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"code-point-at": "^1.0.0",
|
"code-point-at": "^1.0.0",
|
||||||
"is-fullwidth-code-point": "^1.0.0",
|
"is-fullwidth-code-point": "^1.0.0",
|
||||||
@@ -7630,7 +7631,6 @@
|
|||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^2.0.0"
|
"ansi-regex": "^2.0.0"
|
||||||
}
|
}
|
||||||
@@ -7674,14 +7674,12 @@
|
|||||||
"wrappy": {
|
"wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -12780,6 +12778,12 @@
|
|||||||
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
|
||||||
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="
|
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="
|
||||||
},
|
},
|
||||||
|
"prettier": {
|
||||||
|
"version": "1.18.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.18.2.tgz",
|
||||||
|
"integrity": "sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"pretty-format": {
|
"pretty-format": {
|
||||||
"version": "23.6.0",
|
"version": "23.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.6.0.tgz",
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
"lint": "eslint --ext .js --ext .jsx .",
|
"lint": "eslint --ext .js --ext .jsx .",
|
||||||
"add-locale": "lingui add-locale",
|
"add-locale": "lingui add-locale",
|
||||||
"extract-strings": "lingui extract",
|
"extract-strings": "lingui extract",
|
||||||
"compile-strings": "lingui compile"
|
"compile-strings": "lingui compile",
|
||||||
|
"prettier": "prettier --write \"src/**/*.{js,jsx,scss}\""
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
@@ -36,6 +37,7 @@
|
|||||||
"enzyme-to-json": "^3.3.5",
|
"enzyme-to-json": "^3.3.5",
|
||||||
"eslint": "^5.6.0",
|
"eslint": "^5.6.0",
|
||||||
"eslint-config-airbnb": "^17.1.0",
|
"eslint-config-airbnb": "^17.1.0",
|
||||||
|
"eslint-config-prettier": "^5.0.0",
|
||||||
"eslint-import-resolver-webpack": "0.11.1",
|
"eslint-import-resolver-webpack": "0.11.1",
|
||||||
"eslint-plugin-import": "^2.14.0",
|
"eslint-plugin-import": "^2.14.0",
|
||||||
"eslint-plugin-jsx-a11y": "^6.1.1",
|
"eslint-plugin-jsx-a11y": "^6.1.1",
|
||||||
@@ -44,6 +46,7 @@
|
|||||||
"history": "^4.9.0",
|
"history": "^4.9.0",
|
||||||
"jest": "^24.7.1",
|
"jest": "^24.7.1",
|
||||||
"node-sass": "^4.12.0",
|
"node-sass": "^4.12.0",
|
||||||
|
"prettier": "^1.18.2",
|
||||||
"react-hot-loader": "^4.3.3",
|
"react-hot-loader": "^4.3.3",
|
||||||
"sass-loader": "^7.1.0",
|
"sass-loader": "^7.1.0",
|
||||||
"style-loader": "^0.23.0",
|
"style-loader": "^0.23.0",
|
||||||
|
|||||||
@@ -1,61 +1,102 @@
|
|||||||
const NotificationsMixin = (parent) => class extends parent {
|
const NotificationsMixin = parent =>
|
||||||
readNotificationTemplates (id, params = {}) {
|
class extends parent {
|
||||||
return this.http.get(`${this.baseUrl}${id}/notification_templates/`, { params });
|
readNotificationTemplates(id, params = {}) {
|
||||||
}
|
return this.http.get(`${this.baseUrl}${id}/notification_templates/`, {
|
||||||
|
params,
|
||||||
readNotificationTemplatesSuccess (id, params = {}) {
|
});
|
||||||
return this.http.get(`${this.baseUrl}${id}/notification_templates_success/`, { params });
|
|
||||||
}
|
|
||||||
|
|
||||||
readNotificationTemplatesError (id, params = {}) {
|
|
||||||
return this.http.get(`${this.baseUrl}${id}/notification_templates_error/`, { params });
|
|
||||||
}
|
|
||||||
|
|
||||||
associateNotificationTemplatesSuccess (resourceId, notificationId) {
|
|
||||||
return this.http.post(`${this.baseUrl}${resourceId}/notification_templates_success/`, { id: notificationId });
|
|
||||||
}
|
|
||||||
|
|
||||||
disassociateNotificationTemplatesSuccess (resourceId, notificationId) {
|
|
||||||
return this.http.post(`${this.baseUrl}${resourceId}/notification_templates_success/`, { id: notificationId, disassociate: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
associateNotificationTemplatesError (resourceId, notificationId) {
|
|
||||||
return this.http.post(`${this.baseUrl}${resourceId}/notification_templates_error/`, { id: notificationId });
|
|
||||||
}
|
|
||||||
|
|
||||||
disassociateNotificationTemplatesError (resourceId, notificationId) {
|
|
||||||
return this.http.post(`${this.baseUrl}${resourceId}/notification_templates_error/`, { id: notificationId, disassociate: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is a helper method meant to simplify setting the "on" or "off" status of
|
|
||||||
* a related notification.
|
|
||||||
*
|
|
||||||
* @param[resourceId] - id of the base resource
|
|
||||||
* @param[notificationId] - id of the notification
|
|
||||||
* @param[notificationType] - the type of notification, options are "success" and "error"
|
|
||||||
* @param[associationState] - Boolean for associating or disassociating, options are true or false
|
|
||||||
*/
|
|
||||||
// eslint-disable-next-line max-len
|
|
||||||
updateNotificationTemplateAssociation (resourceId, notificationId, notificationType, associationState) {
|
|
||||||
if (notificationType === 'success' && associationState === true) {
|
|
||||||
return this.associateNotificationTemplatesSuccess(resourceId, notificationId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (notificationType === 'success' && associationState === false) {
|
readNotificationTemplatesSuccess(id, params = {}) {
|
||||||
return this.disassociateNotificationTemplatesSuccess(resourceId, notificationId);
|
return this.http.get(
|
||||||
|
`${this.baseUrl}${id}/notification_templates_success/`,
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (notificationType === 'error' && associationState === true) {
|
readNotificationTemplatesError(id, params = {}) {
|
||||||
return this.associateNotificationTemplatesError(resourceId, notificationId);
|
return this.http.get(
|
||||||
|
`${this.baseUrl}${id}/notification_templates_error/`,
|
||||||
|
{ params }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (notificationType === 'error' && associationState === false) {
|
associateNotificationTemplatesSuccess(resourceId, notificationId) {
|
||||||
return this.disassociateNotificationTemplatesError(resourceId, notificationId);
|
return this.http.post(
|
||||||
|
`${this.baseUrl}${resourceId}/notification_templates_success/`,
|
||||||
|
{ id: notificationId }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Error(`Unsupported notificationType, associationState combination: ${notificationType}, ${associationState}`);
|
disassociateNotificationTemplatesSuccess(resourceId, notificationId) {
|
||||||
}
|
return this.http.post(
|
||||||
};
|
`${this.baseUrl}${resourceId}/notification_templates_success/`,
|
||||||
|
{ id: notificationId, disassociate: true }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
associateNotificationTemplatesError(resourceId, notificationId) {
|
||||||
|
return this.http.post(
|
||||||
|
`${this.baseUrl}${resourceId}/notification_templates_error/`,
|
||||||
|
{ id: notificationId }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
disassociateNotificationTemplatesError(resourceId, notificationId) {
|
||||||
|
return this.http.post(
|
||||||
|
`${this.baseUrl}${resourceId}/notification_templates_error/`,
|
||||||
|
{ id: notificationId, disassociate: true }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a helper method meant to simplify setting the "on" or "off" status of
|
||||||
|
* a related notification.
|
||||||
|
*
|
||||||
|
* @param[resourceId] - id of the base resource
|
||||||
|
* @param[notificationId] - id of the notification
|
||||||
|
* @param[notificationType] - the type of notification, options are "success" and "error"
|
||||||
|
* @param[associationState] - Boolean for associating or disassociating,
|
||||||
|
* options are true or false
|
||||||
|
*/
|
||||||
|
// eslint-disable-next-line max-len
|
||||||
|
updateNotificationTemplateAssociation(
|
||||||
|
resourceId,
|
||||||
|
notificationId,
|
||||||
|
notificationType,
|
||||||
|
associationState
|
||||||
|
) {
|
||||||
|
if (notificationType === 'success' && associationState === true) {
|
||||||
|
return this.associateNotificationTemplatesSuccess(
|
||||||
|
resourceId,
|
||||||
|
notificationId
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (notificationType === 'success' && associationState === false) {
|
||||||
|
return this.disassociateNotificationTemplatesSuccess(
|
||||||
|
resourceId,
|
||||||
|
notificationId
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (notificationType === 'error' && associationState === true) {
|
||||||
|
return this.associateNotificationTemplatesError(
|
||||||
|
resourceId,
|
||||||
|
notificationId
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (notificationType === 'error' && associationState === false) {
|
||||||
|
return this.disassociateNotificationTemplatesError(
|
||||||
|
resourceId,
|
||||||
|
notificationId
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Error(
|
||||||
|
`Unsupported notificationType, associationState combination: ${notificationType}, ${associationState}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
export default NotificationsMixin;
|
export default NotificationsMixin;
|
||||||
|
|||||||
Reference in New Issue
Block a user