permissions for Administrator accidentally removed - sonarqube

While trying to cleanup a Sonar instance from unwanted users/permissions it seems that the permissions for the Administrator have been withdrawn. We can no longer see the settings menu item (normally appears next to the Administrators login link), cannot change alerts any more ...
I have spent a couple of hours now trying to find out where in the DB these permissions reside and hoping to put them back using some insert statements in the DB.
Can someone explain how to put this back? I can login with the Administrator but that is all, no more administrator permissions.

This happens often enough that a FAQ section has been created for it. You'll have to fix it at the database level:
INSERT INTO user_roles(user_id, role) VALUES ((select id from users where login='mylogin'), 'admin');

Related

no permission to see this field in strapi

I am unable to enter data to fields which I have created in user collection type in strapi.
I wanted to create extra fields in user collection in strapi so I created some extra fields from builder , but when trying to enter data , the newly created fields are not editable .
You can try following ways, and check if any one of them works -
Method 1
there can always be an issue with Strapi server,
I restarted the server manually and it is fixed.
Method 2
your user might not have permission to view that field.
you can change permission of a user by -
step 1 - Login to your strapi cms with Admin account and check if you are able to edit that field(the one with no permission), if so then continue with following steps, else this method wont work for you.
setp 2 - click on settings in left panel , select the user , from the list select the user that you want to change permission with, give read write , and other permissions you want to give.
re-login with your account from which you were facing the problem, it should work now
Method 3
There might be a sync issue with your DB, sometimes your data is not synced with your DB, try deleting the field and re creating it.
I hope one of this solves your issue
After I ran into the issue multiple times myself and couldn't fix it even after re-deploying again (and again...), I found the following worked for me:
In the deployed version, go to Content-Type Builder
Select the content type that contains the field causing problems
Click the Configure the view button
Change the position of an arbitrary field
Click Save
This worked for me and also didn't require a re-deployment of my app.

User has does not have permission to be mentioned

We have a TFS user who appears to have the same permissions as a colleague in their team. However this user can't be #mentioned despite having the ability to open and close and otherwise edit the bug that they can't be mentioned in.
The following error is emailed to me following attempting to #mention this user.
#Joe Bloggs cannot be mentioned in the Bug 41729. The user does not have
sufficient permissions.
We can't see any differences between a user that can be tagged and one that can't.
We were getting this same error.
Went into the project settings -> security.
Clicked "remove" on that user
at which point the "remove" changed into an "undo".
Clicked the "undo".
Now we are no longer seeing this error. Seems like something internally just needed to be recombobulated :-)
If you are sure that the user exists and can be mentioned with "Joe Bloggs" then they do not have read permission on the bug you are referring to. You should go back and check what group membership they have in the project.

Umbraco: Admin password retrieval

I am using Visual Studio 2015 to install the umbraco through nuget. I have setup and running the demo site and logging into the backoffice screen. The next day I go and run the site again and try to log into the backoffice but i can't log into it. Assuming my password typed wrong. I went to 'forgot my password' page to reset my password but ican't receive any email from it.
I looked at the database but the password was hashed.
How do i get the password.
Forgot password e-mail won't be sent if you haven't configured SMTP settings in your web.config file. But the problem is probably caused by different things e.g.:
DateTime change between system and database - it may cause problems with synchronization.
System files permissions (e.g. I'm struggling with Windows problem now which is resetting my user permissions from time to time... thanks Microsoft... and I'm unable to authorize my users in the backoffice from time to time).
If it's anything from above list, you need to perform additional checks and steps to solve the problem. But starting from resetting the password, the easiest way to solve your problem may be to use this simple, little package: https://our.umbraco.org/projects/developer-tools/umbraco-admin-reset/ (DLL basically). When you'll place this DLL in the /bin directory, during the app startup, it will reset your base user (with ID = 0) to login: Admin and password: Admin1234!.
First make sure you are using the email address you entered during the install as the username, this has caught me out a few times before. Check in the database that the [userLogin] matches the username/email you are trying to login with. It's incredibly misleading (in my opinion) for newcomers to Umbraco that the [userName] column is really the users name and not the username.
If that doesn't help, check your browser console for errors - you may see a an error along the lines of 400 (Bad Request) in which case I would refer you to this long thread on the forums which has lots of options to try and resolve the error:
https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/50407-Login-failed-for-user-in-Umbraco-7
The one that has worked for me in the past is by adding the following in my web.config:
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
</customHeaders>
</httpProtocol>
It's not advisable to leave this in your solution when it moves to production though as you will probably want tighter control over the allowed access control methods.

Team Explorer Everywhere - Domain user could not be validated

I am using Team Explorer Everywhere command line tool on a mac. I've setup a connection to the TFS and i got my files. Checked them out for editing and i see on another machine they are indeed checked out. Now when i try to check them back in i run
sudo tf checkin MiniOrka.iOS -recursive -comment:Testing -login:myUsernam#myDomain,myPW
But all i get is:
Exception in thread "main" com.microsoft.tfs.core.ws.runtime.exceptions.SOAPFault: >RebuildCallersViews: Connecting Domain User could not be validated. ---> >RebuildCallersViews: Connecting Domain User could not be validated. ---> >RebuildCallersViews: Connecting Domain User could not be validated.
at com.microsoft.tfs.core.ws.runtime.client.SOAP12Service.examineResponseDOMForFault(SOAP12Service.java:127)
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.examineBodyForFault(SOAPService.java:826)
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:454)
at ms.tfs.workitemtracking.clientservices._03._ClientService2Soap12Service.getMetadataEx2(_ClientService2Soap12Service.java:745)
at com.microsoft.tfs.core.clients.workitem.internal.metadata.Metadata.update(Metadata.java:515)
at com.microsoft.tfs.core.clients.workitem.internal.metadata.Metadata.update(Metadata.java:482)
at com.microsoft.tfs.core.clients.workitem.internal.WITContext.(WITContext.java:97)
at com.microsoft.tfs.core.clients.workitem.WorkItemClient.getContext(WorkItemClient.java:359)
at com.microsoft.tfs.core.clients.workitem.WorkItemClient.query(WorkItemClient.java:521)
at com.microsoft.tfs.client.clc.vc.commands.CommandCheckin.checkWorkItems(CommandCheckin.java:354)
at com.microsoft.tfs.client.clc.vc.commands.CommandCheckin.run(CommandCheckin.java:181)
at com.microsoft.tfs.client.clc.Application.run(Application.java:294)
at com.microsoft.tfs.client.clc.Application.run(Application.java:144)
at com.microsoft.tfs.client.clc.vc.Main.main(Main.java:33)
And my files remain checked out. I am a member of the Contributor group (they can add, modify and delete items within the team project).
Anyone know how to fix this?
Try using -login:myUsernam#myDomain and entering the password at the prompt that follows.

Update YouTrack state on issue from checkin comment in SVN

I've been trying to set issues to status "fixed" from my SVN commits, but it keeps on failing. This is what I've been trying as SVN comment:
#TCSE-20 fixed
and
TCSE-20 fixed
Where TCSE-20 of course is my issue id. I then run my build in TeamCity, which is linked to the YouTrack project.
The comment gets recognized in YouTrack as it's added to the Comments tab. But the state remains as Submitted. What am I doing wrong?
The solution was what I was hinting in my comment. I am the administrator of our YouTrack server, and I used my email address for the "root" account, as well as having my own user, based on my username, with the same email address. When I changed the "root" accounts email address to one of my colleagues, the commands executed correctly.
Now I would like to know how to solve this better, like disabling "root" from the user lookup function, but that will be another issue. :-)

Resources